channeldb: replace method RevocationLogTail
This commit replaces the method RevocationLogTail which in used in our unit test with a private method revocationLogTailCommitHeight. The new method returns the commit height only since that's what's needed in the test.
This commit is contained in:
2 files changed
+21
-27
No files matched your search
@@ -791,11 +791,11 @@ func TestChannelStateTransition(t *testing.T) {
|
||||
|
||||
// The state number recovered from the tail of the revocation log
|
||||
// should be identical to this current state.
|
||||
logTail, err := channel.RevocationLogTail()
|
||||
logTailHeight, err := channel.revocationLogTailCommitHeight()
|
||||
if err != nil {
|
||||
t.Fatalf("unable to retrieve log: %v", err)
|
||||
}
|
||||
if logTail.CommitHeight != oldRemoteCommit.CommitHeight {
|
||||
if logTailHeight != oldRemoteCommit.CommitHeight {
|
||||
t.Fatal("update number doesn't match")
|
||||
}
|
||||
|
||||
@@ -827,11 +827,11 @@ func TestChannelStateTransition(t *testing.T) {
|
||||
|
||||
// Once again, state number recovered from the tail of the revocation
|
||||
// log should be identical to this current state.
|
||||
logTail, err = channel.RevocationLogTail()
|
||||
logTailHeight, err = channel.revocationLogTailCommitHeight()
|
||||
if err != nil {
|
||||
t.Fatalf("unable to retrieve log: %v", err)
|
||||
}
|
||||
if logTail.CommitHeight != oldRemoteCommit.CommitHeight {
|
||||
if logTailHeight != oldRemoteCommit.CommitHeight {
|
||||
t.Fatal("update number doesn't match")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user