Browse Source

Fixed structures for peercoin

peercoin
Intel 10 years ago
parent
commit
13670c2a92
  1. 2
      src/server/poolserver/NetworkMgr/NetworkMgr.cpp
  2. 7
      src/server/shared/Bitcoin/Bitcoin.h

2
src/server/poolserver/NetworkMgr/NetworkMgr.cpp

@ -72,6 +72,8 @@ void NetworkMgr::UpdateBlockTemplate() @@ -72,6 +72,8 @@ void NetworkMgr::UpdateBlockTemplate()
block->tx.push_back(tx);
}
block->signature = BinaryData(72, 0);
// Genrate merkle tree
block->BuildMerkleTree();

7
src/server/shared/Bitcoin/Bitcoin.h

@ -48,9 +48,14 @@ namespace Bitcoin @@ -48,9 +48,14 @@ namespace Bitcoin
txin.script = scriptsig.Binary();
txin.n = 0;
ByteBuffer temp;
temp.Append<uint8>(pubkey.size());
temp << pubkey;
temp.Append<uint8>(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;

Loading…
Cancel
Save