mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
bitcoin: create new wrapper type bitcoin_txid, log backward endianness.
It's just a sha256_double, but importantly when we convert it to a string (in type_to_string, which is used in logging) we use bitcoin_txid_to_hex() so it's reversed as people expect. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include <common/htlc.h>
|
||||
|
||||
struct keyset;
|
||||
struct sha256_double;
|
||||
|
||||
/* BOLT #3:
|
||||
*
|
||||
@@ -67,7 +66,7 @@ static inline u64 commit_tx_base_fee(u32 feerate_per_kw,
|
||||
* transaction, so we carefully use the terms "self" and "other" here.
|
||||
*/
|
||||
struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
|
||||
const struct sha256_double *funding_txid,
|
||||
const struct bitcoin_txid *funding_txid,
|
||||
unsigned int funding_txout,
|
||||
u64 funding_satoshis,
|
||||
enum side funder,
|
||||
|
||||
Reference in New Issue
Block a user