File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -796,12 +796,6 @@ bool CWallet::CreateTransactionInternal(
796796 nBytes += GetSizeOfCompactSize (nExtraPayloadSize) + nExtraPayloadSize;
797797 }
798798
799- if (static_cast <size_t >(nBytes) > MAX_STANDARD_TX_SIZE) {
800- // Do not create oversized transactions (bad-txns-oversize).
801- error = _ (" Transaction too large" );
802- return false ;
803- }
804-
805799 // Remove scriptSigs to eliminate the fee calculation dummy signatures
806800 for (auto & txin : txNew.vin ) {
807801 txin.scriptSig = CScript ();
@@ -962,6 +956,12 @@ bool CWallet::CreateTransactionInternal(
962956
963957 // Return the constructed transaction data.
964958 tx = MakeTransactionRef (std::move (txNew));
959+
960+ // Limit size
961+ if (static_cast <size_t >(nBytes) > MAX_STANDARD_TX_SIZE) {
962+ error = _ (" Transaction too large" );
963+ return false ;
964+ }
965965 }
966966
967967 if (nFeeRet > m_default_max_tx_fee) {
You can’t perform that action at this time.
0 commit comments