Change Transaction.example to ensure uniqueness

This commit is contained in:
Mark Spanbroek 2021-06-30 13:55:45 +02:00
parent c054636381
commit b0b40d3829
1 changed files with 2 additions and 2 deletions

View File

@ -15,13 +15,13 @@ proc example*(_: type Wallet): Wallet =
proc example*(_: type Transaction): Transaction = proc example*(_: type Transaction): Transaction =
let alice = PublicKey.alice let alice = PublicKey.alice
let bob = PublicKey.bob let carol = PublicKey.example
let victor = PublicKey.victor let victor = PublicKey.victor
let genesis = Transaction.genesis let genesis = Transaction.genesis
let amount = rand(100).u256 let amount = rand(100).u256
var transaction = !Transaction.init( var transaction = !Transaction.init(
{genesis.hash: alice}, {genesis.hash: alice},
{bob: amount, alice: 100.u256 - amount}, {carol: amount, alice: 100.u256 - amount},
victor victor
) )
transaction transaction