Skip to content

Commit 5d6b6e2

Browse files
committed
fixup Add segregated witness transaction serialization: add missing witness flags
1 parent a613599 commit 5d6b6e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/qt/walletmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
332332
return TransactionCommitFailed;
333333

334334
CTransaction* t = (CTransaction*)newTx;
335-
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
335+
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_WITNESS);
336336
ssTx << *t;
337337
transaction_array.append(&(ssTx[0]), ssTx.size());
338338
}

src/zmq/zmqpublishnotifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
145145
LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex());
146146

147147
const Consensus::Params& consensusParams = Params().GetConsensus();
148-
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
148+
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_WITNESS);
149149
{
150150
LOCK(cs_main);
151151
CBlock block;
@@ -166,7 +166,7 @@ bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr
166166
{
167167
uint256 hash = transaction.GetHash();
168168
LogPrint("zmq", "zmq: Publish rawtx %s\n", hash.GetHex());
169-
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
169+
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_WITNESS);
170170
ss << transaction;
171171
int rc = zmq_send_multipart(psocket, "rawtx", 5, &(*ss.begin()), ss.size(), 0);
172172
return rc == 0;

0 commit comments

Comments
 (0)