lnrpc+rpcserver: Adding last_update timestamp to RoutingPolicy

lnrpc/rpc.proto: updates RoutingPolicy last_update number

rpcserver: adding LastUpdate field to marshalDbEdge

This commit adds a LastUpdate field to each RoutingPolicy, it will show
the time each RoutingPolicy was updated.

lnrpc: regenerating proto files
This commit is contained in:
ccdle12 2019-06-28 09:59:44 +01:00
parent 93aad89f4c
commit a93d63f04b
No known key found for this signature in database
GPG Key ID: D28DF4293D698C5A
4 changed files with 510 additions and 493 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1794,6 +1794,7 @@ message RoutingPolicy {
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
bool disabled = 5 [json_name = "disabled"];
uint64 max_htlc_msat = 6 [json_name = "max_htlc_msat"];
uint32 last_update = 7 [json_name = "last_update"];
}
/**
@ -1813,7 +1814,7 @@ message ChannelEdge {
uint64 channel_id = 1 [json_name = "channel_id"];
string chan_point = 2 [json_name = "chan_point"];
uint32 last_update = 3 [json_name = "last_update"];
uint32 last_update = 3 [json_name = "last_update", deprecated = true];
string node1_pub = 4 [json_name = "node1_pub"];
string node2_pub = 5 [json_name = "node2_pub"];

View File

@ -3166,6 +3166,10 @@
"max_htlc_msat": {
"type": "string",
"format": "uint64"
},
"last_update": {
"type": "integer",
"format": "int64"
}
}
},

View File

@ -3770,6 +3770,7 @@ func marshalDbEdge(edgeInfo *channeldb.ChannelEdgeInfo,
FeeBaseMsat: int64(c1.FeeBaseMSat),
FeeRateMilliMsat: int64(c1.FeeProportionalMillionths),
Disabled: c1.ChannelFlags&lnwire.ChanUpdateDisabled != 0,
LastUpdate: uint32(c1.LastUpdate.Unix()),
}
}
@ -3781,6 +3782,7 @@ func marshalDbEdge(edgeInfo *channeldb.ChannelEdgeInfo,
FeeBaseMsat: int64(c2.FeeBaseMSat),
FeeRateMilliMsat: int64(c2.FeeProportionalMillionths),
Disabled: c2.ChannelFlags&lnwire.ChanUpdateDisabled != 0,
LastUpdate: uint32(c2.LastUpdate.Unix()),
}
}