multi: rename: ReadBucket to RBucket

This commit is contained in:
Conner Fromknecht committed 2020-05-26 18:21:08 -07:00
1 parent d0d2ca403d
commit 455ddfebdb
18 files changed
+63 -63

No files matched your search

+5 -5
View File
@@ -202,7 +202,7 @@ func (c *ChannelGraph) SourceNode() (*LightningNode, error) {
// of the graph. The source node is treated as the center node within a
// star-graph. This method may be used to kick off a path finding algorithm in
// order to explore the reachability of another node based off the source node.
func (c *ChannelGraph) sourceNode(nodes kvdb.ReadBucket) (*LightningNode, error) {
func (c *ChannelGraph) sourceNode(nodes kvdb.RBucket) (*LightningNode, error) {
selfPub := nodes.Get(sourceKey)
if selfPub == nil {
return nil, ErrSourceNodeNotSet
@@ -680,7 +680,7 @@ func putLightningNode(nodeBucket kvdb.RwBucket, aliasBucket kvdb.RwBucket,
return nodeBucket.Put(nodePub, b.Bytes())
}
func fetchLightningNode(nodeBucket kvdb.ReadBucket,
func fetchLightningNode(nodeBucket kvdb.RBucket,
nodePub []byte) (LightningNode, error) {
nodeBytes := nodeBucket.Get(nodePub)
@@ -983,8 +983,8 @@ func putChanEdgePolicyUnknown(edges kvdb.RwBucket, channelID uint64,
return edges.Put(edgeKey[:], unknownPolicy)
}
func fetchChanEdgePolicy(edges kvdb.ReadBucket, chanID []byte,
nodePub []byte, nodes kvdb.ReadBucket) (*ChannelEdgePolicy, error) {
func fetchChanEdgePolicy(edges kvdb.RBucket, chanID []byte,
nodePub []byte, nodes kvdb.RBucket) (*ChannelEdgePolicy, error) {
var edgeKey [33 + 8]byte
copy(edgeKey[:], nodePub)
@@ -1084,7 +1084,7 @@ func serializeChanEdgePolicy(w io.Writer, edge *ChannelEdgePolicy,
}
func deserializeChanEdgePolicy(r io.Reader,
nodes kvdb.ReadBucket) (*ChannelEdgePolicy, error) {
nodes kvdb.RBucket) (*ChannelEdgePolicy, error) {
edge := &ChannelEdgePolicy{}
@@ -437,7 +437,7 @@ func (db *DB) fetchPaymentsMigration9() ([]*Payment, error) {
return payments, nil
}
func fetchPaymentMigration9(bucket kvdb.ReadBucket) (*Payment, error) {
func fetchPaymentMigration9(bucket kvdb.RBucket) (*Payment, error) {
var (
err error
p = &Payment{}
@@ -4,7 +4,7 @@ import "github.com/lightningnetwork/lnd/channeldb/kvdb"
// fetchPaymentStatus fetches the payment status of the payment. If the payment
// isn't found, it will default to "StatusUnknown".
func fetchPaymentStatus(bucket kvdb.ReadBucket) PaymentStatus {
func fetchPaymentStatus(bucket kvdb.RBucket) PaymentStatus {
if bucket.Get(paymentSettleInfoKey) != nil {
return StatusSucceeded
}
+1 -1
View File
@@ -316,7 +316,7 @@ func (db *DB) FetchPayments() ([]*Payment, error) {
return payments, nil
}
func fetchPayment(bucket kvdb.ReadBucket) (*Payment, error) {
func fetchPayment(bucket kvdb.RBucket) (*Payment, error) {
var (
err error
p = &Payment{}