diff --git a/contracts/value/value.go b/contracts/value/value.go index 8cc6ea71c..6e1a6b831 100644 --- a/contracts/value/value.go +++ b/contracts/value/value.go @@ -46,7 +46,7 @@ const ( credentialAllCommand = "all" // contractKeyPrefix is used to prefix keys in the K/V store. - contractKeyPrefix = "VAL" + contractKeyPrefix = "VALU" // intentionally 4 bytes only, not a typo! ) // Command defines a type of command for the value contract diff --git a/test/integration_test.go b/test/integration_test.go index e4882e708..3a1441eef 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -87,7 +87,7 @@ func getTest[T require.TestingT](numNode, numTx int) func(t T) { require.NoError(t, err) for i := 0; i < numTx; i++ { - key := make([]byte, 32) + key := make([]byte, 28) // only 224 bits are available _, err = rand.Read(key) require.NoError(t, err) @@ -102,7 +102,7 @@ func getTest[T require.TestingT](numNode, numTx int) func(t T) { err = addAndWait(t, timeout, manager, nodes[0].(cosiDelaNode), args...) require.NoError(t, err) - proof, err := nodes[0].GetOrdering().GetProof(key) + proof, err := nodes[0].GetOrdering().GetProof(append([]byte("VALU"), key...)) require.NoError(t, err) require.Equal(t, []byte("value1"), proof.GetValue()) } @@ -112,7 +112,13 @@ func getTest[T require.TestingT](numNode, numTx int) func(t T) { // ----------------------------------------------------------------------------- // Utility functions -func addAndWait(t require.TestingT, to time.Duration, manager txn.Manager, node cosiDelaNode, args ...txn.Arg) error { +func addAndWait( + t require.TestingT, + to time.Duration, + manager txn.Manager, + node cosiDelaNode, + args ...txn.Arg, +) error { manager.Sync() tx, err := manager.Make(args...)