Set Sprout note data in WalletTest.WriteWitnessCache

This commit is contained in:
Jack Grigg 2019-01-02 13:23:28 +00:00
parent 7afb23ef31
commit a6da0b03da
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 8 additions and 0 deletions

View File

@ -1559,6 +1559,14 @@ TEST(WalletTests, WriteWitnessCache) {
wallet.AddSproutSpendingKey(sk);
auto wtx = GetValidReceive(sk, 10, true);
auto note = GetNote(sk, wtx, 0, 1);
auto nullifier = note.nullifier(sk);
mapSproutNoteData_t noteData;
JSOutPoint jsoutpt {wtx.GetHash(), 0, 1};
SproutNoteData nd {sk.address(), nullifier};
noteData[jsoutpt] = nd;
wtx.SetSproutNoteData(noteData);
wallet.AddToWallet(wtx, true, NULL);
// TxnBegin fails