Skip to content

Commit

Permalink
dbft: remove Timestamp() API from dbft.RecoveryRequest
Browse files Browse the repository at this point in the history
This API is unused. In it's essence it's important for the dBFT to know
that RecoveryRequest is received, no timestamp information required for
its handling.

A part of #84.

Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Mar 6, 2024
1 parent ae9a7cf commit 4c0adab
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
6 changes: 0 additions & 6 deletions internal/consensus/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@ func TestPayload_Setters(t *testing.T) {
assert.EqualValues(t, 4, cv.NewViewNumber())
})

t.Run("RecoveryRequest", func(t *testing.T) {
r := NewRecoveryRequest(secToNanoSec(321))

require.EqualValues(t, secToNanoSec(321), r.Timestamp())
})

t.Run("RecoveryMessage", func(t *testing.T) {
r := NewRecoveryMessage(&crypto.Uint256{1, 2, 3})

Expand Down
5 changes: 0 additions & 5 deletions internal/consensus/recovery_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,3 @@ func (m *recoveryRequest) DecodeBinary(r *gob.Decoder) error {
m.timestamp = aux.Timestamp
return nil
}

// Timestamp implements RecoveryRequest interface.
func (m *recoveryRequest) Timestamp() uint64 {
return secToNanoSec(m.timestamp)
}
5 changes: 1 addition & 4 deletions recovery_request.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package dbft

// RecoveryRequest represents dBFT RecoveryRequest message.
type RecoveryRequest interface {
// Timestamp returns this message's timestamp.
Timestamp() uint64
}
type RecoveryRequest interface{}

0 comments on commit 4c0adab

Please sign in to comment.