File tree Expand file tree Collapse file tree 3 files changed +119
-75
lines changed Expand file tree Collapse file tree 3 files changed +119
-75
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ string dump_secp256k1_ecdsa_recoverable_signature(
6060 return dump_hex (sp->data , sizeof (sp->data ));
6161}
6262
63+ string dump_secret (const struct secret *sp)
64+ {
65+ return dump_hex (sp->data , sizeof (sp->data ));
66+ }
67+
6368string dump_node_id (const struct node_id *pp)
6469{
6570 return dump_hex (pp->k , sizeof (pp->k ));
@@ -70,6 +75,28 @@ string dump_pubkey(const struct pubkey *kp)
7075 return dump_hex (kp->pubkey .data , sizeof (kp->pubkey .data ));
7176}
7277
78+ string dump_witnesses (const u8 ***wp)
79+ {
80+ ostringstream ostrm;
81+ ostrm << " [" ;
82+ for (size_t input_ndx = 0 ; input_ndx < tal_count (wp); ++input_ndx) {
83+ if (input_ndx != 0 )
84+ ostrm << " " ;
85+ ostrm << " [" ;
86+ u8 const **stack = wp[input_ndx];
87+ for (size_t item_ndx = 0 ; item_ndx < tal_count (stack);
88+ ++item_ndx) {
89+ if (item_ndx != 0 )
90+ ostrm << " " ;
91+ u8 const *item = stack[item_ndx];
92+ ostrm << dump_hex (item, tal_count (item));
93+ }
94+ ostrm << " ]" ;
95+ }
96+ ostrm << " ]" ;
97+ return ostrm.str ();
98+ }
99+
73100string dump_basepoints (const struct basepoints *bp)
74101{
75102 ostringstream ostrm;
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ std::string dump_bitcoin_txid(const struct bitcoin_txid *txid);
66std::string dump_bitcoin_signature (const struct bitcoin_signature *sp);
77std::string dump_secp256k1_ecdsa_signature (const secp256k1_ecdsa_signature *sp);
88std::string dump_secp256k1_ecdsa_recoverable_signature (const secp256k1_ecdsa_recoverable_signature *sp);
9+ std::string dump_secret (const struct secret *sp);
910std::string dump_node_id (const struct node_id *pp);
1011std::string dump_pubkey (const struct pubkey *kp);
12+ std::string dump_witnesses (const u8 ***wp);
1113std::string dump_unilateral_close_info (const struct unilateral_close_info *ip);
1214std::string dump_utxo (const struct utxo *in);
1315std::string dump_utxos (const struct utxo **utxos);
You can’t perform that action at this time.
0 commit comments