Skip to content

Commit

Permalink
Merge pull request #128 from BlockMechanic/segwit
Browse files Browse the repository at this point in the history
Segwit
  • Loading branch information
BlockMechanic authored Oct 20, 2022
2 parents ac8d279 + 797ad58 commit 69083b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/consensus/tx_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
static bool CheckData(TxValidationState &state, const CTxData *p)
{
if (p->vData.size() < 1) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-output-data-size-small");
return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-output-data-size-small..\n");
}

const size_t MAX_DATA_OUTPUT_SIZE = 1024; // (max 1024 bytes) 1kb
Expand Down
3 changes: 2 additions & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3568,7 +3568,8 @@ bool CWallet::CreateTransactionInternal(
CTxData *s = (CTxData*) &datar;
out0->nType = s->nType;
out0->vData = s->vData;
txNew.vdata.push_back(out0);
if (out0->vData.size() > 0)
txNew.vdata.push_back(out0);
break;
}
case OUTPUT_CONTRACT:{
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
* selected by SelectCoins(); Also create the change output, when needed
* @note passing nChangePosInOut as -1 will result in setting a random position
*/
bool CreateTransaction(const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CAmount& nFeeRet, int& nChangePosInOut, bilingual_str& error, const CCoinControl& coin_control, FeeCalculation& fee_calc_out, bool sign = true, const CTxDataBase& datar = CTxDataBase(), AvailableCoinsType coin_type=ALL_COINS, int extraPayloadSize = 0);
bool CreateTransaction(const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CAmount& nFeeRet, int& nChangePosInOut, bilingual_str& error, const CCoinControl& coin_control, FeeCalculation& fee_calc_out, bool sign = true, const CTxDataBase& datar = CTxDataBase(0), AvailableCoinsType coin_type=ALL_COINS, int extraPayloadSize = 0);
/**
* Submit the transaction to the node's mempool and then relay to peers.
* Should be called after CreateTransaction unless you want to abort
Expand Down

0 comments on commit 69083b9

Please sign in to comment.