From 13670c2a926df0232f7947cdb989d54b643db322 Mon Sep 17 00:00:00 2001 From: Intel Date: Sun, 4 May 2014 18:43:20 -0400 Subject: [PATCH] Fixed structures for peercoin --- src/server/poolserver/NetworkMgr/NetworkMgr.cpp | 2 ++ src/server/shared/Bitcoin/Bitcoin.h | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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;