fix: Fixed an error calculating the length of blocklimit
issue
@@ -130,6 +130,7 @@ BOAT_RESULT BoatFiscobcosTxInit(BoatFiscobcosWallet *wallet_ptr,
UtilityHexToBin(tx_ptr->rawtx_fields.blocklimit.field, 32,
(BCHAR *)tx_ptr->wallet_ptr->web3intf_context_ptr->web3_result_string_buf.field_ptr,
TRIMBIN_LEFTTRIM, BOAT_TRUE);
+ BoatLog(BOAT_LOG_CRITICAL, "%s", tx_ptr->rawtx_fields.blocklimit.field);
if (tx_ptr->rawtx_fields.blocklimit.field_len == 0)
{
BoatLog(BOAT_LOG_CRITICAL, "blocklimit Initialize failed.");
@@ -168,7 +169,8 @@ BOAT_RESULT BoatFiscobcosTxInit(BoatFiscobcosWallet *wallet_ptr,
{
if (blocklimitTmp.field[i] != 0x00)
{
- blocklimitTmp.field_len++; //compute valid data length
+ blocklimitTmp.field_len = 32 - i; //compute valid data length
+ break;
}
}
tx_ptr->rawtx_fields.blocklimit.field_len = blocklimitTmp.field_len;//update data length
