@ -129,7 +129,7 @@ func TestZKInputsHashTestVector0(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
// check that there no exist more accounts
@ -218,11 +218,11 @@ func TestZKInputsHashTestVector1(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 257 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 1 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
// check that there no exist more accounts
@ -464,7 +464,7 @@ func TestZKInputs0(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
// check that there no exist more accounts
@ -567,12 +567,12 @@ func TestZKInputs1(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "15999899" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 257 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 1 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16000101" , acc . Balance . String ( ) )
@ -706,22 +706,22 @@ func TestZKInputs2(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "15997798" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 257 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 1 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16000202" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 258 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 2 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 2 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 2 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16001000" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 259 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 3 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 3 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 3 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16001000" , acc . Balance . String ( ) )
@ -853,22 +853,22 @@ func TestZKInputs3(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "15997798" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 257 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 1 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16000202" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 258 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 2 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 2 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 2 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16002000" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 259 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 3 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 3 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 3 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16000000" , acc . Balance . String ( ) )
@ -1010,22 +1010,22 @@ func TestZKInputs4(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "15997798" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 257 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 1 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16000202" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 258 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 2 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 2 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 2 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "32001000" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 259 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 3 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 3 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 3 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16001000" , acc . Balance . String ( ) )
@ -1149,12 +1149,12 @@ func TestZKInputs5(t *testing.T) {
// check expected account keys values from tx inputs
acc , err := sdb . GetAccount ( common . Idx ( 256 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 0 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 0 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "15997798" , acc . Balance . String ( ) )
acc , err = sdb . GetAccount ( common . Idx ( 257 ) )
require . NoError ( t , err )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . PublicKey . String ( ) )
assert . Equal ( t , users [ 1 ] . BJJ . Public ( ) . Compress ( ) . String ( ) , acc . BJJ . String ( ) )
assert . Equal ( t , users [ 1 ] . Addr . Hex ( ) , acc . EthAddr . Hex ( ) )
assert . Equal ( t , "16000202" , acc . Balance . String ( ) )