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:
yyforyongyu
2022-03-16 18:15:06 +08:00
parent fcb314bf2c
commit 5f508f9278
2 changed files with 21 additions and 27 deletions

View File

@@ -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")
}