watchtower/wtclient/session_queue: unify logging

This commit is contained in:
Conner Fromknecht
2019-06-13 17:27:32 -07:00
parent 3b51906a78
commit ab4a4b77f5
3 changed files with 71 additions and 59 deletions

View File

@@ -1,6 +1,7 @@
package wtdb
import (
"fmt"
"io"
"github.com/btcsuite/btcd/btcec"
@@ -160,6 +161,11 @@ func (b *BackupID) Decode(r io.Reader) error {
)
}
// String returns a human-readable encoding of a BackupID.
func (b *BackupID) String() string {
return fmt.Sprintf("backup(%x, %d)", b.ChanID, b.CommitHeight)
}
// CommittedUpdate holds a state update sent by a client along with its
// allocated sequence number and the exact remote commitment the encrypted
// justice transaction can rectify.