rgb-cln/wallet
Rusty Russell 3543530172 build_utxos: fix weight calculation, and make more accurate.
Accuracy improvements:

1. We assumed the output was a p2wpkh, but it can be user-supplied now.
2. We assumed we always had change; remove this for wallet_select_all.

Calculation out-by-one fixes:

1. We need to add 1 byte (4 sipa) for the input count.
2. We need to add 1 byte (4 sipa) for the output count.
3. We need to add 1 byte (4 sipa) for the output script length for each output.
4. We need to add 1 byte (4 sipa) for the input script length for each input.
5. We need to add 1 byte (4 sipa) for the PUSH optcode for each P2SH input.

The results are now a slight overestimate (due to guessing 73 bytes
for signature, whereas they're 71 or 72 in practice).

Fixes: #458
Reported-by: Jonas Nick @jonasnick
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-20 12:56:15 +01:00
..
test Re-enable builds with DEVELOPER=0 2017-12-20 12:43:10 +01:00
.gitignore wallet: Create and manage a sqlite3 database for the wallet 2017-06-06 09:16:10 +09:30
Makefile wallet: move tests into test/ dir like other unit tests. 2017-12-13 22:46:10 +01:00
db.c database: don't leak query string. 2017-12-13 22:46:10 +01:00
db.h db: make db_exec() an internal function. 2017-11-06 10:24:34 +01:00
wallet.c build_utxos: fix weight calculation, and make more accurate. 2017-12-20 12:56:15 +01:00
wallet.h build_utxos: fix weight calculation, and make more accurate. 2017-12-20 12:56:15 +01:00
walletrpc.c build_utxos: fix weight calculation, and make more accurate. 2017-12-20 12:56:15 +01:00
walletrpc.h walletrpc: Implemented the withdrawal flow 2017-06-23 16:02:20 +09:30