[quorum]modify function logic
@@ -439,24 +439,16 @@ BOAT_RESULT BoatQuorumTxSetNonce(BoatQuorumTx *tx_ptr, BUINT64 nonce)
BOAT_RESULT BoatQuorumTxSetGasLimit(BoatQuorumTx *tx_ptr, BoatFieldMax32B *gas_limit_ptr)
{
- if (tx_ptr == NULL)
+ if (tx_ptr == NULL || gas_limit_ptr == NULL)
{
BoatLog(BOAT_LOG_CRITICAL, "Arguments cannot be NULL.");
return BOAT_ERROR_COMMON_INVALID_ARGUMENT;
}
// Set gasLimit
- if (gas_limit_ptr != NULL)
- {
memcpy(&tx_ptr->rawtx_fields.gaslimit, gas_limit_ptr, sizeof(BoatFieldMax32B));
return BOAT_SUCCESS;
}
- else
- {
- BoatLog(BOAT_LOG_CRITICAL, "Argument cannot be NULL.");
- return BOAT_ERROR_COMMON_INVALID_ARGUMENT;
- }
-}
BOAT_RESULT BoatQuorumTxSetPrivateFor(BoatQuorumTx *tx_ptr, BUINT8 public[BOAT_QUORUM_PUBLIC_KEY_SIZE])
