TODO(cdecker) Stolen from shachain, move to some appropriate location */
| 1151 | |
| 1152 | /* TODO(cdecker) Stolen from shachain, move to some appropriate location */ |
| 1153 | static unsigned int count_trailing_zeroes(uint64_t index) |
| 1154 | { |
| 1155 | #if HAVE_BUILTIN_CTZLL |
| 1156 | return index ? (unsigned int)__builtin_ctzll(index) : SHACHAIN_BITS; |
| 1157 | #else |
| 1158 | unsigned int i; |
| 1159 | |
| 1160 | for (i = 0; i < SHACHAIN_BITS; i++) { |
| 1161 | if (index & (1ULL << i)) |
| 1162 | break; |
| 1163 | } |
| 1164 | return i; |
| 1165 | #endif |
| 1166 | } |
| 1167 | |
| 1168 | static void wallet_stub_shachain_init(struct wallet *wallet, |
| 1169 | struct wallet_shachain *chain) |
no outgoing calls
no test coverage detected