@@ -1248,6 +1248,9 @@ static int tx_add_elements_raw_input(
12481248 };
12491249 bool is_coinbase ;
12501250 int ret ;
1251+ #ifndef BUILD_ELEMENTS
1252+ (void )pegin_witness ;
1253+ #endif
12511254
12521255 if (flags )
12531256 return WALLY_EINVAL ; /* TODO: Allow creation of p2pkh/p2sh using flags */
@@ -1763,7 +1766,7 @@ static inline int tx_to_bip143_bytes(const struct wally_tx *tx,
17631766{
17641767 unsigned char buff [TX_STACK_SIZE / 2 ], * buff_p = buff ;
17651768 size_t i , inputs_size , outputs_size , issuances_size = 0 , buff_len = sizeof (buff );
1766- uint64_t is_elements = 0 ;
1769+ size_t is_elements = 0 ;
17671770 const bool anyonecanpay = opts -> sighash & WALLY_SIGHASH_ANYONECANPAY ;
17681771 const bool sh_none = (opts -> sighash & SIGHASH_MASK ) == WALLY_SIGHASH_NONE ;
17691772 const bool sh_single = (opts -> sighash & SIGHASH_MASK ) == WALLY_SIGHASH_SINGLE ;
@@ -2500,7 +2503,7 @@ static int tx_from_bytes(const unsigned char *bytes, size_t bytes_len,
25002503 p += sizeof (uint32_t );
25012504 for (i = 0 ; i < num_inputs ; ++ i ) {
25022505 const unsigned char * issuance_amount_rangeproof , * inflation_keys_rangeproof ;
2503- size_t issuance_amount_rangeproof_len , inflation_keys_rangeproof_len , offset ;
2506+ uint64_t issuance_amount_rangeproof_len , inflation_keys_rangeproof_len , offset ;
25042507 proof_from_bytes (issuance_amount_rangeproof , & issuance_amount_rangeproof_len );
25052508 proof_from_bytes (inflation_keys_rangeproof , & inflation_keys_rangeproof_len );
25062509 ret = tx_elements_input_issuance_proof_init (result -> inputs + i ,
@@ -2522,7 +2525,7 @@ static int tx_from_bytes(const unsigned char *bytes, size_t bytes_len,
25222525
25232526 for (i = 0 ; i < num_outputs ; ++ i ) {
25242527 const unsigned char * surjectionproof , * rangeproof ;
2525- size_t surjectionproof_len , rangeproof_len ;
2528+ uint64_t surjectionproof_len , rangeproof_len ;
25262529 proof_from_bytes (surjectionproof , & surjectionproof_len );
25272530 proof_from_bytes (rangeproof , & rangeproof_len );
25282531 ret = tx_elements_output_proof_init (result -> outputs + i ,
@@ -2625,7 +2628,7 @@ static int tx_get_signature_hash(const struct wally_tx *tx,
26252628{
26262629 unsigned char buff [TX_STACK_SIZE ], * buff_p = buff ;
26272630 size_t n , n2 ;
2628- uint64_t is_elements = 0 ;
2631+ size_t is_elements = 0 ;
26292632 int ret ;
26302633 const struct tx_serialize_opts opts = {
26312634 sighash , tx_sighash , index , script , script_len , satoshi ,
0 commit comments