Browse Source

Fixed structures for peercoin

peercoin
Intel 11 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()
block->tx.push_back(tx); block->tx.push_back(tx);
} }
block->signature = BinaryData(72, 0);
// Genrate merkle tree // Genrate merkle tree
block->BuildMerkleTree(); block->BuildMerkleTree();

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

@ -48,9 +48,14 @@ namespace Bitcoin
txin.script = scriptsig.Binary(); txin.script = scriptsig.Binary();
txin.n = 0; txin.n = 0;
ByteBuffer temp;
temp.Append<uint8>(pubkey.size());
temp << pubkey;
temp.Append<uint8>(Bitcoin::OP_CHECKSIG);
TxOut txout; TxOut txout;
txout.value = value; txout.value = value;
txout.scriptPubKey = Bitcoin::Script(pubkey) + Bitcoin::OP_CHECKSIG; txout.scriptPubKey = Bitcoin::Script(temp.Binary());
Transaction tx; Transaction tx;
tx.version = 1; tx.version = 1;

Loading…
Cancel
Save