diff --git a/stateTransition_test.go b/stateTransition_test.go index c9593fc..1f4c207 100644 --- a/stateTransition_test.go +++ b/stateTransition_test.go @@ -87,12 +87,10 @@ func TestStateTransitionInputs_InputsMarshal(t *testing.T) { NewState: newState, IsOldStateGenesis: true, AuthClaim: Claim{ - Claim: authClaim, - TreeState: TreeState{}, - Proof: authMTPProof, - NonRevProof: ClaimNonRevStatus{ - TreeState: TreeState{}, - Proof: authNonRevMTPProof, + Claim: authClaim, + Proof: authMTPProof, + NonRevProof: &ClaimNonRevStatus{ + Proof: authNonRevMTPProof, }, }, Signature: signature, @@ -101,7 +99,7 @@ func TestStateTransitionInputs_InputsMarshal(t *testing.T) { inputBytes, err := sti.InputsMarshal() assert.Nil(t, err) - expectedJSONInputs := `{"authClaim":["304427537360709784173770334266246861770","0","9582165609074695838007712438814613121302719752874385708394134542816240804696","18271435592817415588213874506882839610978320325722319742324814767882756910515","11203087622270641253","0","0","0"],"authClaimMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"authClaimNonRevMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"authClaimNonRevMtpAuxHi":"0","authClaimNonRevMtpAuxHv":"0","authClaimNonRevMtpNoAux":"1","userID":"26599707002460144379092755370384635496563807452878989192352627271768342528","newUserState":"7569111473237253646417788189126468973900432716598921661470118514516731079797","oldUserState":"6317996369756476782464660619835940615734517981889733696047139451453239145426","isOldStateGenesis":"1","claimsTreeRoot":"18337129644116656308842422695567930755039142442806278977230099338026575870840","revTreeRoot":"0","rootsTreeRoot":"0","signatureR8x":"9484102035827996121666608170002743002783492772260590322761477321381254509037","signatureR8y":"19295134567339498210855406074518612682643335122341225376941332925036431891102","signatureS":"282291664505682519059669624505331509305429004374837545959385601323093440910"}` + expectedJSONInputs := `{"authClaim":["304427537360709784173770334266246861770","0","9582165609074695838007712438814613121302719752874385708394134542816240804696","18271435592817415588213874506882839610978320325722319742324814767882756910515","11203087622270641253","0","0","0"],"authClaimMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"authClaimNonRevMtp":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"authClaimNonRevMtpAuxHi":"0","authClaimNonRevMtpAuxHv":"0","authClaimNonRevMtpNoAux":"1","userID":"26599707002460144379092755370384635496563807452878989192352627271768342528","newUserState":"7569111473237253646417788189126468973900432716598921661470118514516731079797","oldUserState":"6317996369756476782464660619835940615734517981889733696047139451453239145426","isOldStateGenesis":"1","claimsTreeRoot":"18337129644116656308842422695567930755039142442806278977230099338026575870840","revTreeRoot":"0","rootsTreeRoot":"0","signatureR8x":"9484102035827996121666608170002743002783492772260590322761477321381254509037","signatureR8y":"19295134567339498210855406074518612682643335122341225376941332925036431891102","signatureS":"282291664505682519059669624505331509305429004374837545959385601323093440910"}` assert.JSONEq(t, expectedJSONInputs, string(inputBytes)) }