lnrpc: re-enable custom records

This commit also renames the rpc field for consistency. As it wasn't
functional and the id doesn't change, this isn't considered a breaking
change.
This commit is contained in:
Joost Jager
2019-11-20 12:00:25 +01:00
parent 0abc054eb0
commit 352334d470
8 changed files with 831 additions and 727 deletions

View File

@@ -30,9 +30,9 @@ const (
)
const (
// customTypeStart is the start of the custom tlv type range as defined
// CustomTypeStart is the start of the custom tlv type range as defined
// in BOLT 01.
customTypeStart = 65536
CustomTypeStart = 65536
)
// String returns a human-readable description of the violation as a verb.
@@ -249,7 +249,7 @@ func getMinRequiredViolation(set tlv.TypeSet) *tlv.Type {
//
// We always accept custom fields, because a higher level
// application may understand them.
if known || t%2 != 0 || t >= customTypeStart {
if known || t%2 != 0 || t >= CustomTypeStart {
continue
}