mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
generate-wire.py: generate chain_hash fields as sha256_double.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
26ffa8fdec
commit
b3514d3430
3 changed files with 5 additions and 3 deletions
|
@ -243,7 +243,7 @@ static u8 *funder_channel(struct state *state,
|
|||
1000 * state->funding_satoshis);
|
||||
|
||||
msg = towire_open_channel(state,
|
||||
&state->chainparams->genesis_blockhash.sha,
|
||||
&state->chainparams->genesis_blockhash,
|
||||
&channel_id,
|
||||
state->funding_satoshis, state->push_msat,
|
||||
state->localconf.dust_limit_satoshis,
|
||||
|
@ -479,7 +479,7 @@ static u8 *fundee_channel(struct state *state,
|
|||
* `delayed_payment_basepoint` are not valid DER-encoded compressed
|
||||
* secp256k1 pubkeys.
|
||||
*/
|
||||
if (!fromwire_open_channel(peer_msg, NULL, &chain_hash.sha, &channel_id,
|
||||
if (!fromwire_open_channel(peer_msg, NULL, &chain_hash, &channel_id,
|
||||
&state->funding_satoshis, &state->push_msat,
|
||||
&state->remoteconf->dust_limit_satoshis,
|
||||
&state->remoteconf->max_htlc_value_in_flight_msat,
|
||||
|
|
|
@ -17,6 +17,7 @@ type2size = {
|
|||
'struct preimage': 32,
|
||||
'struct pubkey': 33,
|
||||
'struct sha256': 32,
|
||||
'struct sha256_double': 32,
|
||||
'u64': 8,
|
||||
'u32': 4,
|
||||
'u16': 2,
|
||||
|
@ -76,6 +77,7 @@ partialtypemap = {
|
|||
'signature': FieldType('secp256k1_ecdsa_signature'),
|
||||
'features': FieldType('u8'),
|
||||
'channel_id': FieldType('struct channel_id'),
|
||||
'chain_hash': FieldType('struct sha256_double'),
|
||||
'pad': FieldType('pad'),
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ struct msg_node_announcement {
|
|||
u8 *addresses;
|
||||
};
|
||||
struct msg_open_channel {
|
||||
struct sha256 chain_hash;
|
||||
struct sha256_double chain_hash;
|
||||
struct channel_id temporary_channel_id;
|
||||
u64 funding_satoshis;
|
||||
u64 push_msat;
|
||||
|
|
Loading…
Add table
Reference in a new issue