| 944 | } |
| 945 | |
| 946 | struct chain_topology *new_topology(struct lightningd *ld, struct log *log) |
| 947 | { |
| 948 | struct chain_topology *topo = tal(ld, struct chain_topology); |
| 949 | |
| 950 | topo->ld = ld; |
| 951 | block_map_init(&topo->block_map); |
| 952 | list_head_init(&topo->outgoing_txs); |
| 953 | txwatch_hash_init(&topo->txwatches); |
| 954 | txowatch_hash_init(&topo->txowatches); |
| 955 | topo->log = log; |
| 956 | memset(topo->feerate, 0, sizeof(topo->feerate)); |
| 957 | topo->bitcoind = new_bitcoind(topo, ld, log); |
| 958 | topo->poll_seconds = 30; |
| 959 | topo->feerate_uninitialized = true; |
| 960 | topo->root = NULL; |
| 961 | topo->sync_waiters = tal(topo, struct list_head); |
| 962 | topo->stopping = false; |
| 963 | list_head_init(topo->sync_waiters); |
| 964 | |
| 965 | return topo; |
| 966 | } |
| 967 | |
| 968 | static void check_blockcount(struct chain_topology *topo, u32 blockcount) |
| 969 | { |
no test coverage detected