mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
json: add a param parser for a txid
This commit is contained in:
committed by
Rusty Russell
parent
c40250ad0b
commit
a4a193840f
@@ -68,3 +68,10 @@ bool json_to_short_channel_id(const char *buffer, const jsmntok_t *tok,
|
||||
tok->end - tok->start, scid,
|
||||
may_be_deprecated_form));
|
||||
}
|
||||
|
||||
bool json_to_txid(const char *buffer, const jsmntok_t *tok,
|
||||
struct bitcoin_txid *txid)
|
||||
{
|
||||
return bitcoin_txid_from_hex(buffer + tok->start,
|
||||
tok->end - tok->start, txid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user