Skip to content

Commit 4c0adab

Browse files
committed
dbft: remove Timestamp() API from dbft.RecoveryRequest
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]>
1 parent ae9a7cf commit 4c0adab

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

internal/consensus/message_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,6 @@ func TestPayload_Setters(t *testing.T) {
159159
assert.EqualValues(t, 4, cv.NewViewNumber())
160160
})
161161

162-
t.Run("RecoveryRequest", func(t *testing.T) {
163-
r := NewRecoveryRequest(secToNanoSec(321))
164-
165-
require.EqualValues(t, secToNanoSec(321), r.Timestamp())
166-
})
167-
168162
t.Run("RecoveryMessage", func(t *testing.T) {
169163
r := NewRecoveryMessage(&crypto.Uint256{1, 2, 3})
170164

internal/consensus/recovery_request.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,3 @@ func (m *recoveryRequest) DecodeBinary(r *gob.Decoder) error {
3535
m.timestamp = aux.Timestamp
3636
return nil
3737
}
38-
39-
// Timestamp implements RecoveryRequest interface.
40-
func (m *recoveryRequest) Timestamp() uint64 {
41-
return secToNanoSec(m.timestamp)
42-
}

recovery_request.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
package dbft
22

33
// RecoveryRequest represents dBFT RecoveryRequest message.
4-
type RecoveryRequest interface {
5-
// Timestamp returns this message's timestamp.
6-
Timestamp() uint64
7-
}
4+
type RecoveryRequest interface{}

0 commit comments

Comments
 (0)