it should updateOnBlock in correct way outputs spent in forAll Gen non

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
it should "updateOnBlock() in correct way - outputs spent" in {
forAll(Gen.nonEmptyListOf(trackedBoxGen)) { boxes =>
withVersionedStore(10) { store =>
val fakeTxId = modifierIdGen.sample.get
val registry = new WalletRegistry(store)(settings.walletSettings)
val blockId = modifierIdGen.sample.get
val outs = boxes.map(bx => bx.copy(spendingHeightOpt = None, spendingTxIdOpt = None))
val inputs = outs.map(tb => (fakeTxId, EncodedBoxId @@ tb.boxId))
registry.updateOnBlock(outs, Seq.empty, inputs, Seq.empty)(blockId, 100)
registry.readCertainUnspentBoxes shouldBe Seq.empty
}
}
}