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