channeldb: change MinFeePerKb to FeePerKw in OpenChannel struct

This commit modifies the name of a field in the OpenChannel struct to
better reflect its actual usage within this protocol. The FeePerKw
represents the amount of satoshi to be paid as fees per kilo-weight.
This field is set at the opening of a transaction and will be able to
be updated properly via the usage of the update_fee method.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-05-16 18:44:01 -07:00
1 parent 4ac7cc719f
commit 75d5396445
2 files changed
+15 -13

No files matched your search

+2 -2
View File
@@ -144,7 +144,7 @@ func createTestChannelState(cdb *DB) (*OpenChannel, error) {
ChanType: SingleFunder,
IdentityPub: pubKey,
ChanID: id,
MinFeePerKb: btcutil.Amount(5000),
FeePerKw: btcutil.Amount(5000),
TheirDustLimit: btcutil.Amount(200),
OurDustLimit: btcutil.Amount(200),
OurCommitKey: privKey.PubKey(),
@@ -217,7 +217,7 @@ func TestOpenChannelPutGetDelete(t *testing.T) {
if !reflect.DeepEqual(state.ChanID, newState.ChanID) {
t.Fatal("chan id's don't match")
}
if state.MinFeePerKb != newState.MinFeePerKb {
if state.FeePerKw != newState.FeePerKw {
t.Fatal("fee/kb doesn't match")
}
if state.TheirDustLimit != newState.TheirDustLimit {