psbt-json: remove reliance on bitcoin_tx, use straight wally_psbt struct

This commit is contained in:
niftynei
2020-06-06 14:55:54 -05:00
committed by Christian Decker
parent 175fcf381a
commit 85dca84327
5 changed files with 5 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
#include <arpa/inet.h>
#include <bitcoin/preimage.h>
#include <bitcoin/privkey.h>
#include <bitcoin/psbt.h>
#include <bitcoin/pubkey.h>
#include <bitcoin/short_channel_id.h>
#include <ccan/ccan/str/hex/hex.h>
@@ -242,10 +243,10 @@ void json_add_tx(struct json_stream *result,
void json_add_psbt(struct json_stream *stream,
const char *fieldname,
struct bitcoin_tx *tx)
struct wally_psbt *psbt)
{
const char *psbt_b64;
psbt_b64 = bitcoin_tx_to_psbt_base64(tx, tx);
psbt_b64 = psbt_to_b64(NULL, psbt);
json_add_string(stream, fieldname, take(psbt_b64));
}