Skip to content

Commit 47462d0

Browse files
committed
Prevent warnings building without elements support
1 parent ecc30ad commit 47462d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/transaction.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,9 @@ static inline int tx_to_bip143_bytes(const struct wally_tx *tx,
18561856
size_t i, inputs_size, outputs_size, rangeproof_size = 0, issuances_size = 0, buff_len = sizeof(buff);
18571857
size_t is_elements = 0;
18581858
const bool anyonecanpay = opts->sighash & WALLY_SIGHASH_ANYONECANPAY;
1859+
#ifdef BUILD_ELEMENTS
18591860
const bool sh_rangeproof = opts->sighash & WALLY_SIGHASH_RANGEPROOF;
1861+
#endif
18601862
const bool sh_none = (opts->sighash & SIGHASH_MASK) == WALLY_SIGHASH_NONE;
18611863
const bool sh_single = (opts->sighash & SIGHASH_MASK) == WALLY_SIGHASH_SINGLE;
18621864
unsigned char *p = bytes_out, *output_p;
@@ -2103,7 +2105,9 @@ static int tx_to_bytes(const struct wally_tx *tx,
21032105
{
21042106
size_t n, i, j, witness_count;
21052107
const bool anyonecanpay = opts && opts->sighash & WALLY_SIGHASH_ANYONECANPAY;
2108+
#ifdef BUILD_ELEMENTS
21062109
const bool sh_rangeproof = opts && opts->sighash & WALLY_SIGHASH_RANGEPROOF;
2110+
#endif
21072111
const bool sh_none = opts && (opts->sighash & SIGHASH_MASK) == WALLY_SIGHASH_NONE;
21082112
const bool sh_single = opts && (opts->sighash & SIGHASH_MASK) == WALLY_SIGHASH_SINGLE;
21092113
unsigned char *p = bytes_out;

0 commit comments

Comments
 (0)