channeldb: use binary.Read/Write with bools in channel.go

Use binary.Read/Write in functions to serialize and deserialize
channel close summary and HTLC boolean data, as well as in
methods to put and fetch channel funding info. Remove lnd
implementations of readBool and writeBool as they are no
longer needed. Also fix a few minor typos.
This commit is contained in:
Laura Cressman
2017-09-06 20:29:07 -04:00
committed by Olaoluwa Osuntokun
parent 29687f49eb
commit 156772d04a
3 changed files with 30 additions and 53 deletions

View File

@@ -2304,10 +2304,10 @@ func genRemoteHtlcSigJobs(commitPoint *btcec.PublicKey,
// decrements the available revocation window by 1. After a successful method
// call, the remote party's commitment chain is extended by a new commitment
// which includes all updates to the HTLC log prior to this method invocation.
// The first return parameter is the signature for the commitment transaction
// itself, while the second parameter is a slice of all HTLC signatures (if
// any). The HTLC signatures are sorted according to the BIP 69 order of the
// HTLC's on the commitment transaction.
// The first return parameter is the signature for the commitment
// transaction itself, while the second parameter is a slice of all
// HTLC signatures (if any). The HTLC signatures are sorted according to
// the BIP 69 order of the HTLC's on the commitment transaction.
func (lc *LightningChannel) SignNextCommitment() (*btcec.Signature, []*btcec.Signature, error) {
lc.Lock()
defer lc.Unlock()