Add tx generation lang interpreter

This commit is contained in:
arnaucube
2020-08-19 15:21:35 +02:00
parent 6c0c528b17
commit e2d4599690
6 changed files with 376 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ func (l *Account) BigInts() ([NLEAFELEMS]*big.Int, error) {
// HashValue returns the value of the Account, which is the Poseidon hash of its *big.Int representation
func (l *Account) HashValue() (*big.Int, error) {
b0 := big.NewInt(0)
toHash := [poseidon.T]*big.Int{b0, b0, b0, b0, b0, b0}
toHash := []*big.Int{b0, b0, b0, b0, b0, b0}
lBI, err := l.BigInts()
if err != nil {
return nil, err

View File

@@ -106,7 +106,7 @@ func TestAccountHashValue(t *testing.T) {
v, err := account.HashValue()
assert.Nil(t, err)
assert.Equal(t, "6335844662301214382338419199835935731871537354006112711277201708185593574314", v.String())
assert.Equal(t, "16085711911723375585301279875451049849443101031421093098714359651259271023730", v.String())
}
func TestAccountErrNotInFF(t *testing.T) {