Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lens/util/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,15 @@ var bitfieldCountMarshaller = func(v interface{}) ([]byte, error) {
return nil, err
}

// this struct matches the param schema used in network v14
// see https://github.com/filecoin-project/lily/pull/821/files#r821851219
var ret = struct {
Count uint64
RLE []uint64
}{}
Count uint64 `json:"elemcount"`
RLE []uint64 `json:"rle"`
Type string `json:"_type"`
}{
Type: "bitfield",
}
if r.HasNext() {
first, err := r.NextRun()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions tasks/messages/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func TestParseMessageParams(t *testing.T) {
ChainCommitEpoch: 1287345,
}),
wantMethod: "SubmitWindowedPoSt",
wantEncoded: "{\"Partitions\":[{\"Index\":0,\"Skipped\":{\"Count\":0,\"RLE\":[0]}}],\"Proofs\":[{\"PoStProof\":9,\"ProofBytes\":\"j67Zt7FnIDTt+WZ+JicmOvZJWNShtEUKQp2djqEamrWFJlJ5WWGfhpTmYSimapHhjnSJoQYddySoqKHw6klIY6INz0A4aHmF2xveYKLYcqKxaB6Izis7zWyw4CMLTc3GE93wBuajQ32V1qH5qBsTw3ELzUdlFNgClUhHWushxg7kvmqvtmh9lipXzGnPnrG9p68KnBp40dvhiMBVedNch/pP7cxMH5piwGIQxsn99sQVrZxfVy1+y0SN30t03yjc\"}],\"ChainCommitEpoch\":1287345,\"ChainCommitRand\":\"VyY9gIC10V8w8C1ltrpjqNN6mkk3xgW3Stpnp2ThNW4=\",\"Deadline\":38}",
wantEncoded: "{\"Partitions\":[{\"Index\":0,\"Skipped\":{\"elemcount\":0,\"rle\":[0],\"_type\":\"bitfield\"}}],\"Proofs\":[{\"PoStProof\":9,\"ProofBytes\":\"j67Zt7FnIDTt+WZ+JicmOvZJWNShtEUKQp2djqEamrWFJlJ5WWGfhpTmYSimapHhjnSJoQYddySoqKHw6klIY6INz0A4aHmF2xveYKLYcqKxaB6Izis7zWyw4CMLTc3GE93wBuajQ32V1qH5qBsTw3ELzUdlFNgClUhHWushxg7kvmqvtmh9lipXzGnPnrG9p68KnBp40dvhiMBVedNch/pP7cxMH5piwGIQxsn99sQVrZxfVy1+y0SN30t03yjc\"}],\"ChainCommitEpoch\":1287345,\"ChainCommitRand\":\"VyY9gIC10V8w8C1ltrpjqNN6mkk3xgW3Stpnp2ThNW4=\",\"Deadline\":38}",
wantErr: false,
deepEqual: true,
},
Expand Down Expand Up @@ -235,7 +235,7 @@ func TestParseMessageParams(t *testing.T) {
},
}),
wantMethod: "DeclareFaultsRecovered",
wantEncoded: "{\"Recoveries\":[{\"Deadline\":1,\"Partition\":1,\"Sectors\":{\"Count\":10,\"RLE\":[1,10]}}]}",
wantEncoded: "{\"Recoveries\":[{\"Deadline\":1,\"Partition\":1,\"Sectors\":{\"elemcount\":10,\"rle\":[1,10],\"_type\":\"bitfield\"}}]}",
wantErr: false,
},
// from https://github.com/filecoin-project/lily/issues/892
Expand Down