wallet: Move coin-selection primitives to wallet

We'll re-use them a few times so having them at a central location is
nice. We also fix a bug that was unreserving UTXO entries upon free,
instead of promoting them to being spent.
This commit is contained in:
Christian Decker
2017-06-13 15:42:31 +02:00
committed by Rusty Russell
parent 28030c3d6b
commit 7738bccf42
5 changed files with 115 additions and 67 deletions

View File

@@ -850,6 +850,7 @@ static bool opening_got_hsm_funding_sig(struct subd *hsm, const u8 *resp,
/* Start normal channel daemon. */
peer_start_channeld(fc->peer, GETTING_SIG_FROM_HSM, NULL);
wallet_confirm_utxos(fc->peer->ld->wallet, fc->utxomap);
tal_free(fc);
return true;
}