Skip to content

Commit a55c4e4

Browse files
committed
refactor: replace FirstAdded with Nonce
1 parent f058a18 commit a55c4e4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

capabilities/pdp/sign/piecesadd.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111
const PiecesAddAbility = "pdp/sign/pieces/add"
1212

1313
type PiecesAddCaveats struct {
14-
DataSet *big.Int
15-
FirstAdded *big.Int
16-
PieceData [][]byte
17-
Metadata []Metadata
14+
DataSet *big.Int
15+
Nonce *big.Int
16+
PieceData [][]byte
17+
Metadata []Metadata
1818
// Proofs are links to `blob/accept` receipts for sub-pieces included in each
1919
// piece. They are proofs that the sub-pieces were requested to be stored by
2020
// the node. They correspond to items in `PieceData` i.e. Proofs[0] is the

capabilities/pdp/sign/piecesadd_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818

1919
func TestPiecesAdd(t *testing.T) {
2020
piecesAddCaveats := sign.PiecesAddCaveats{
21-
DataSet: testutil.RandomBigInt(t),
22-
FirstAdded: testutil.RandomBigInt(t),
23-
PieceData: [][]byte{testutil.RandomBytes(t, 32), testutil.RandomBytes(t, 32)},
21+
DataSet: testutil.RandomBigInt(t),
22+
Nonce: testutil.RandomBigInt(t),
23+
PieceData: [][]byte{testutil.RandomBytes(t, 32), testutil.RandomBytes(t, 32)},
2424
Metadata: []sign.Metadata{
2525
{
2626
Keys: []string{"foo"},

capabilities/pdp/sign/sign.ipldsch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type DataSetCreateCaveats struct {
1818

1919
type PiecesAddCaveats struct {
2020
dataSet BigInt
21-
firstAdded BigInt
21+
nonce BigInt
2222
pieceData [Bytes]
2323
metadata [{String:String}]
2424
proofs [[Link]]

0 commit comments

Comments
 (0)