Browse Source

Add JS to second block to ensure witnesses are incremented

pull/4/head
Jack Grigg 8 years ago
parent
commit
9755eb8292
No known key found for this signature in database GPG Key ID: 6A6914DAFBEA00DA
  1. 14
      src/zcbenchmarks.cpp

14
src/zcbenchmarks.cpp

@ -274,6 +274,20 @@ double benchmark_increment_note_witnesses(size_t nTxs)
// Second block
CBlock block2;
block2.hashPrevBlock = block1.GetHash();
{
auto wtx = GetValidReceive(*pzcashParams, sk, 10, true);
auto note = GetNote(*pzcashParams, sk, wtx, 0, 1);
auto nullifier = note.nullifier(sk);
mapNoteData_t noteData;
JSOutPoint jsoutpt {wtx.GetHash(), 0, 1};
CNoteData nd {sk.address(), nullifier};
noteData[jsoutpt] = nd;
wtx.SetNoteData(noteData);
wallet.AddToWallet(wtx, true, NULL);
block2.vtx.push_back(wtx);
}
CBlockIndex index2(block2);
index2.nHeight = 2;

Loading…
Cancel
Save