lnw+ba+utxon+cdb: reverts OutPoint and TxOut encoding

This commit is contained in:
Conner Fromknecht authored and Olaoluwa Osuntokun committed 2017-08-25 17:56:50 -07:00
1 parent 8698085e35
commit 6ffe33f01a
8 files changed
+148 -148

No files matched your search

+3 -3
View File
@@ -269,7 +269,7 @@ func (d *DB) fetchNodeChannels(openChanBucket,
outBytes := bytes.NewReader(k)
chanID := &wire.OutPoint{}
if err := lnwire.ReadOutPoint(outBytes, chanID); err != nil {
if err := readOutpoint(outBytes, chanID); err != nil {
return err
}
@@ -373,7 +373,7 @@ func (d *DB) MarkChannelAsOpen(outpoint *wire.OutPoint,
// Generate the database key, which will consist of the
// IsPending prefix followed by the channel's outpoint.
var b bytes.Buffer
if err := lnwire.WriteOutPoint(&b, outpoint); err != nil {
if err := writeOutpoint(&b, outpoint); err != nil {
return err
}
keyPrefix := make([]byte, 3+b.Len())
@@ -455,7 +455,7 @@ func (d *DB) FetchClosedChannels(pendingOnly bool) ([]*ChannelCloseSummary, erro
func (d *DB) MarkChanFullyClosed(chanPoint *wire.OutPoint) error {
return d.Update(func(tx *bolt.Tx) error {
var b bytes.Buffer
if err := lnwire.WriteOutPoint(&b, chanPoint); err != nil {
if err := writeOutpoint(&b, chanPoint); err != nil {
return err
}