BOLT #3: * * The first secret used: * - MUST be index 281474976710655, * - and from there, the index is decremented. */
| 135 | * - and from there, the index is decremented. |
| 136 | */ |
| 137 | static inline u64 shachain_index(u64 per_commit_index) |
| 138 | { |
| 139 | BUILD_ASSERT((1ULL << SHACHAIN_BITS)-1 == 281474976710655); |
| 140 | assert(per_commit_index < (1ULL << SHACHAIN_BITS)); |
| 141 | return (1ULL << SHACHAIN_BITS)-1 - per_commit_index; |
| 142 | } |
| 143 | |
| 144 | static inline u64 revocations_received(const struct shachain *shachain) |
| 145 | { |
no outgoing calls
no test coverage detected