diff --git a/pkg/api/rchash.go b/pkg/api/rchash.go index a7b20847ca3..4af59ea246b 100644 --- a/pkg/api/rchash.go +++ b/pkg/api/rchash.go @@ -85,7 +85,7 @@ func renderProof(proof redistribution.Proof) Proof { ChunkSpan: proof.ChunkSpan, PostageProof: PostageProof{ Signature: toHex(proof.PostageProof.Signature), - BatchID: toHex(proof.PostageProof.BatchId[:]), + BatchID: toHex(proof.PostageProof.PostageId[:]), Index: strconv.FormatUint(proof.PostageProof.Index, 16), TimeStamp: strconv.FormatUint(proof.PostageProof.TimeStamp, 16), }, diff --git a/pkg/storageincentives/redistribution/abi_types.go b/pkg/storageincentives/redistribution/abi_types.go index 277789d9bd3..32f3434e82e 100644 --- a/pkg/storageincentives/redistribution/abi_types.go +++ b/pkg/storageincentives/redistribution/abi_types.go @@ -33,7 +33,7 @@ type Proof struct { // corresponding structure (of the same name) in Redistribution.sol smart contract. type PostageProof struct { Signature []byte `json:"signature"` - BatchId common.Hash `json:"batchId"` + PostageId common.Hash `json:"batchId"` Index uint64 `json:"index"` TimeStamp uint64 `json:"timeStamp"` } @@ -78,7 +78,7 @@ func NewProof(wp1, wp2, wp3 bmt.Proof, stamp swarm.Stamp, sch *soc.SOC) Proof { ChunkSpan: binary.LittleEndian.Uint64(wp2.Span[:swarm.SpanSize]), // should be uint64 on the other size; copied from pkg/api/bytes.go PostageProof: PostageProof{ Signature: stamp.Sig(), - BatchId: bytes32(stamp.BatchID())[0], + PostageId: bytes32(stamp.BatchID())[0], Index: binary.BigEndian.Uint64(stamp.Index()), TimeStamp: binary.BigEndian.Uint64(stamp.Timestamp()), }, diff --git a/pkg/storageincentives/redistribution/redistribution_test.go b/pkg/storageincentives/redistribution/redistribution_test.go index 84c60000cd4..5b0669efe1c 100644 --- a/pkg/storageincentives/redistribution/redistribution_test.go +++ b/pkg/storageincentives/redistribution/redistribution_test.go @@ -48,7 +48,7 @@ func randProof(t *testing.T) redistribution.Proof { ProofSegments3: randomHashes(t, 7), PostageProof: redistribution.PostageProof{ Signature: testutil.RandBytes(t, 65), - BatchId: randomHashes(t, 1)[0], + PostageId: randomHashes(t, 1)[0], Index: uint64(rand.Int63()), TimeStamp: uint64(rand.Int63()), },