Update log package with fields & file log

Update log package with fields & file log, and update constants in the
repository code to be MixedCase.

resolves #91, resolves #92, resolves #95
This commit is contained in:
arnaucube
2020-09-02 10:05:00 +02:00
parent 18d0658147
commit fdaf2c9ce2
7 changed files with 71 additions and 62 deletions

View File

@@ -114,20 +114,20 @@ func TestAccountErrNotInFF(t *testing.T) {
// Q-1 should not give error
r := new(big.Int).Sub(cryptoConstants.Q, big.NewInt(1))
e := [NLEAFELEMS]*big.Int{z, z, r, r}
e := [NLeafElems]*big.Int{z, z, r, r}
_, err := AccountFromBigInts(e)
assert.Nil(t, err)
// Q should give error
r = cryptoConstants.Q
e = [NLEAFELEMS]*big.Int{z, z, r, r}
e = [NLeafElems]*big.Int{z, z, r, r}
_, err = AccountFromBigInts(e)
assert.NotNil(t, err)
assert.Equal(t, ErrNotInFF, err)
// Q+1 should give error
r = new(big.Int).Add(cryptoConstants.Q, big.NewInt(1))
e = [NLEAFELEMS]*big.Int{z, z, r, r}
e = [NLeafElems]*big.Int{z, z, r, r}
_, err = AccountFromBigInts(e)
assert.NotNil(t, err)
assert.Equal(t, ErrNotInFF, err)