mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
The format we use to generate marshal/unmarshal code is from the spec's tools/extract-formats.py which includes the offset: we don't use it at all, so rather than having manually-calculated (and thus probably wrong) values, or 0, emit it altogther. Reported-by: Christian Decker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2.8 KiB
2.8 KiB
| 1 | # These shouldn't happen |
|---|---|
| 2 | opening_bad_command,0x8000 |
| 3 | opening_key_derivation_failed,0x8001 |
| 4 | opening_bad_param,0x8002 |
| 5 | opening_hsm_failed,0x8003 |
| 6 | # These are due to peer. |
| 7 | opening_peer_write_failed,0x8010 |
| 8 | opening_peer_read_failed,0x8011 |
| 9 | opening_peer_bad_funding,0x8012 |
| 10 | opening_peer_bad_config,0x8013 |
| 11 | opening_peer_bad_initial_message,0x8014 |
| 12 | #include <lightningd/cryptomsg.h> |
| 13 | #include <lightningd/channel_config.h> |
| 14 | opening_init,0 |
| 15 | # Base configuration we'll offer (channel reserve will vary with amount) |
| 16 | opening_init,,our_config,struct channel_config |
| 17 | # Minimum/maximum configuration values we'll accept |
| 18 | opening_init,,max_to_self_delay,4 |
| 19 | opening_init,,min_effective_htlc_capacity_msat,8 |
| 20 | opening_init,,crypto_state,struct crypto_state |
| 21 | # Seed to generate all the keys from |
| 22 | opening_init,,seed,struct privkey |
| 23 | # This means we offer the open. |
| 24 | opening_funder,1 |
| 25 | opening_funder,,funding_satoshis,8 |
| 26 | opening_funder,,push_msat,8 |
| 27 | opening_funder,,feerate_per_kw,4 |
| 28 | opening_funder,,max_minimum_depth,4 |
| 29 | opening_funder,,change_satoshis,u64 |
| 30 | opening_funder,,change_keyindex,u32 |
| 31 | #include <lightningd/utxo.h> |
| 32 | opening_funder,,num_inputs,u16 |
| 33 | opening_funder,,inputs,num_inputs*struct utxo |
| 34 | opening_funder,,bip32_len,u16 |
| 35 | opening_funder,,bip32_seed,bip32_len*u8 |
| 36 | # This gives their sig, means we can broadcast tx: we're done. |
| 37 | opening_funder_reply,101 |
| 38 | opening_funder_reply,,their_config,struct channel_config |
| 39 | opening_funder_reply,,first_commit_sig,secp256k1_ecdsa_signature |
| 40 | opening_funder_reply,,crypto_state,struct crypto_state |
| 41 | opening_funder_reply,,revocation_basepoint,33 |
| 42 | opening_funder_reply,,payment_basepoint,33 |
| 43 | opening_funder_reply,,delayed_payment_basepoint,33 |
| 44 | opening_funder_reply,,their_per_commit_point,33 |
| 45 | opening_funder_reply,,minimum_depth,4 |
| 46 | opening_funder_reply,,remote_fundingkey,33 |
| 47 | opening_funder_reply,,funding_txid,struct sha256_double |
| 48 | # This means they offer the open (contains their offer packet) |
| 49 | opening_fundee,3 |
| 50 | opening_fundee,,minimum_depth,4 |
| 51 | opening_fundee,,min_feerate,4 |
| 52 | opening_fundee,,max_feerate,4 |
| 53 | opening_fundee,,len,2 |
| 54 | opening_fundee,,msg,len*u8 |
| 55 | # This gives their txid and info, means we can send funding_signed: we're done. |
| 56 | opening_fundee_reply,103 |
| 57 | opening_fundee_reply,,their_config,struct channel_config |
| 58 | opening_fundee_reply,,first_commit_sig,secp256k1_ecdsa_signature |
| 59 | opening_fundee_reply,,crypto_state,struct crypto_state |
| 60 | opening_fundee_reply,,revocation_basepoint,33 |
| 61 | opening_fundee_reply,,payment_basepoint,33 |
| 62 | opening_fundee_reply,,delayed_payment_basepoint,33 |
| 63 | opening_fundee_reply,,their_per_commit_point,33 |
| 64 | opening_fundee_reply,,remote_fundingkey,33 |
| 65 | opening_fundee_reply,,funding_txid,struct sha256_double |
| 66 | opening_fundee_reply,,funding_txout,u16 |
| 67 | opening_fundee_reply,,funding_satoshis,8 |
| 68 | opening_fundee_reply,,push_msat,8 |
| 69 | # The (encrypted) funding signed message: send this and we're committed. |
| 70 | opening_fundee_reply,,msglen,u16 |
| 71 | opening_fundee_reply,,funding_signed_msg,msglen*u8 |