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

Function wallet_get_newindex

wallet/wallet.c:679–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679s64 wallet_get_newindex(struct lightningd *ld)
680{
681 u64 newidx = db_get_intvar(ld->wallet->db, "bip32_max_index", 0) + 1;
682
683 if (newidx == BIP32_INITIAL_HARDENED_CHILD)
684 return -1;
685
686 db_set_intvar(ld->wallet->db, "bip32_max_index", newidx);
687 return newidx;
688}
689
690static void wallet_shachain_init(struct wallet *wallet,
691 struct wallet_shachain *chain)

Callers 4

json_newaddrFunction · 0.85
finish_psbtFunction · 0.85
wallet_commit_channelFunction · 0.85
wallet_commit_channelFunction · 0.85

Calls 2

db_set_intvarFunction · 0.85
db_get_intvarFunction · 0.50

Tested by

no test coverage detected