mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-12 02:24:24 +01:00
tools/generate-wire: use amount_msat / amount_sat for peer protocol.
Basically we tell it that every field ending in '_msat' is a struct amount_msat, and 'satoshis' is an amount_sat. The exceptions are channel_update's fee_base_msat which is a u32, and final_incorrect_htlc_amount's incoming_htlc_amt which is also a 'struct amount_msat'. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -180,4 +180,6 @@ PRINTWIRE_STRUCT_TYPE_TO_STRING(pubkey);
|
||||
PRINTWIRE_STRUCT_TYPE_TO_STRING(sha256);
|
||||
PRINTWIRE_STRUCT_TYPE_TO_STRING(secret);
|
||||
PRINTWIRE_STRUCT_TYPE_TO_STRING(short_channel_id);
|
||||
PRINTWIRE_STRUCT_TYPE_TO_STRING(amount_sat);
|
||||
PRINTWIRE_STRUCT_TYPE_TO_STRING(amount_msat);
|
||||
PRINTWIRE_TYPE_TO_STRING(secp256k1_ecdsa_signature, secp256k1_ecdsa_signature);
|
||||
|
||||
@@ -14,6 +14,8 @@ void printwire_u8_array(const char *fieldname, const u8 **cursor, size_t *plen,
|
||||
void printwire_bitcoin_blkid(const char *fieldname, const struct bitcoin_blkid *bitcoin_blkid);
|
||||
void printwire_bitcoin_txid(const char *fieldname, const struct bitcoin_txid *bitcoin_txid);
|
||||
void printwire_channel_id(const char *fieldname, const struct channel_id *channel_id);
|
||||
void printwire_amount_sat(const char *fieldname, const struct amount_sat *sat);
|
||||
void printwire_amount_msat(const char *fieldname, const struct amount_msat *msat);
|
||||
void printwire_preimage(const char *fieldname, const struct preimage *preimage);
|
||||
void printwire_pubkey(const char *fieldname, const struct pubkey *pubkey);
|
||||
void printwire_secp256k1_ecdsa_signature(const char *fieldname, const secp256k1_ecdsa_signature *);
|
||||
|
||||
Reference in New Issue
Block a user