MCPcopy Create free account
hub / github.com/ElementsProject/lightning / blocknum_reduce

Function blocknum_reduce

lightningd/chaintopology.c:1455–1460  ·  view source on GitHub ↗

Subtract, but floored at 0 */

Source from the content-addressed store, hash-verified

1453
1454/* Subtract, but floored at 0 */
1455static u32 blocknum_reduce(u32 blockheight, s32 sub)
1456{
1457 if ((u32)sub > blockheight)
1458 return 0;
1459 return blockheight - sub;
1460}
1461
1462void setup_topology(struct chain_topology *topo)
1463{

Callers 1

setup_topologyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected