diff --git a/src/server/poolserver/NetworkMgr/NetworkMgr.cpp b/src/server/poolserver/NetworkMgr/NetworkMgr.cpp index 403e286..8000a63 100644 --- a/src/server/poolserver/NetworkMgr/NetworkMgr.cpp +++ b/src/server/poolserver/NetworkMgr/NetworkMgr.cpp @@ -72,6 +72,8 @@ void NetworkMgr::UpdateBlockTemplate() block->tx.push_back(tx); } + block->signature = BinaryData(72, 0); + // Genrate merkle tree block->BuildMerkleTree(); diff --git a/src/server/shared/Bitcoin/Bitcoin.h b/src/server/shared/Bitcoin/Bitcoin.h index 25f206e..cb78de9 100644 --- a/src/server/shared/Bitcoin/Bitcoin.h +++ b/src/server/shared/Bitcoin/Bitcoin.h @@ -48,9 +48,14 @@ namespace Bitcoin txin.script = scriptsig.Binary(); txin.n = 0; + ByteBuffer temp; + temp.Append(pubkey.size()); + temp << pubkey; + temp.Append(Bitcoin::OP_CHECKSIG); + TxOut txout; txout.value = value; - txout.scriptPubKey = Bitcoin::Script(pubkey) + Bitcoin::OP_CHECKSIG; + txout.scriptPubKey = Bitcoin::Script(temp.Binary()); Transaction tx; tx.version = 1;