Skip to content

Commit

Permalink
chore: update LND to v0.9.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Jan 22, 2020
1 parent 8a1dc47 commit c51ffa7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 60 deletions.
6 changes: 3 additions & 3 deletions docker/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Image:
DOGECOIN_VERSION = "1.14.2"
ZCASH_VERSION = "2.1.0-1"

LND_VERSION = "0.8.2-beta"
LND_VERSION = "0.9.0-beta"

IMAGES: Dict[str, Image] = {
"berkeley-db": Image(
Expand Down Expand Up @@ -85,12 +85,12 @@ class Image:
UBUNTU_VERSION,
BuildArgument(
name="GOLANG_VERSION",
value="1.13.5-buster"
value="1.13.6-buster"
)
]
),
"regtest": Image(
tags=["1.2.0"],
tags=["1.3.0"],
arguments=[
UBUNTU_VERSION,
BuildArgument(
Expand Down
2 changes: 0 additions & 2 deletions docker/lnd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ COPY lnd/patches /patches
RUN cd vendor/github.com/ltcsuite/ltcd && patch -p1 < /patches/ltcd.patch
RUN cd vendor/github.com/btcsuite/btcutil && patch -p1 < /patches/btcutil.patch

# RUN cat vendor/github.com/ltcsuite/ltcd/chaincfg/params.go

RUN go build -mod vendor -v -trimpath -tags="autopilotrpc signrpc walletrpc chainrpc invoicesrpc routerrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lnd
RUN go build -mod vendor -v -trimpath -tags="autopilotrpc invoicesrpc walletrpc routerrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lncli

Expand Down
54 changes: 0 additions & 54 deletions docker/lnd/patches/btcutil.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,3 @@
witnessVer, witnessProg, err := decodeSegWitAddress(addr)
if err != nil {
return nil, err

--- a/address_test.go
+++ b/address_test.go
@@ -20,11 +20,13 @@ import (
type CustomParamStruct struct {
PubKeyHashAddrID byte
ScriptHashAddrID byte
+ Bech32HRPSegwit string
}

var CustomParams = CustomParamStruct{
- PubKeyHashAddrID: 0x30, // starts with L
- ScriptHashAddrID: 0x32, // starts with M
+ PubKeyHashAddrID: 0x30, // starts with L
+ ScriptHashAddrID: 0x32, // starts with M
+ Bech32HRPSegwit: "ltc", // starts with ltc
}

// We use this function to be able to test functionality in DecodeAddress for
@@ -32,6 +34,7 @@ var CustomParams = CustomParamStruct{
func applyCustomParams(params chaincfg.Params, customParams CustomParamStruct) chaincfg.Params {
params.PubKeyHashAddrID = customParams.PubKeyHashAddrID
params.ScriptHashAddrID = customParams.ScriptHashAddrID
+ params.Bech32HRPSegwit = customParams.Bech32HRPSegwit
return params
}

@@ -628,6 +631,26 @@ func TestAddresses(t *testing.T) {
},
net: &chaincfg.TestNet3Params,
},
+ {
+ name: "segwit litecoin mainnet p2wpkh v0",
+ addr: "LTC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KGMN4N9",
+ encoded: "ltc1qw508d6qejxtdg4y5r3zarvary0c5xw7kgmn4n9",
+ valid: true,
+ result: btcutil.TstAddressWitnessPubKeyHash(
+ 0,
+ [20]byte{
+ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94,
+ 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6},
+ CustomParams.Bech32HRPSegwit,
+ ),
+ f: func() (btcutil.Address, error) {
+ pkHash := []byte{
+ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94,
+ 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6}
+ return btcutil.NewAddressWitnessPubKeyHash(pkHash, &customParams)
+ },
+ net: &customParams,
+ },
// Unsupported witness versions (version 0 only supported at this point)
{
name: "segwit mainnet witness v1",
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"nodemon:watch": "nodemon --watch dist -e js bin/boltzd",
"lint": "tslint --project tsconfig.json && tslint --config tslint-alt.json 'bin/*' 'test/**/*.ts'",
"lint:fix": "tslint --fix --project tsconfig.json && tslint --fix --config tslint-alt.json 'bin/*' 'test/**/*.ts'",
"docker:start": "docker run -d --name regtest -p 18443:18443 -p 19443:19443 -p 18332:18332 -p 18232:18232 -p 29000:29000 -p 29001:29001 -p 29002:29002 -p 30000:30000 -p 30001:30001 -p 30002:30002 -p 40000:40000 -p 40001:40001 -p 40002:40002 -p 50000:50000 -p 50001:50001 -p 50002:50002 -p 10009:10009 -p 10011:10011 -p 11009:11009 -p 11010:11010 -p 8081:8081 boltz/regtest:1.2.0",
"docker:start": "docker run -d --name regtest -p 18443:18443 -p 19443:19443 -p 18332:18332 -p 18232:18232 -p 29000:29000 -p 29001:29001 -p 29002:29002 -p 30000:30000 -p 30001:30001 -p 30002:30002 -p 40000:40000 -p 40001:40001 -p 40002:40002 -p 50000:50000 -p 50001:50001 -p 50002:50002 -p 10009:10009 -p 10011:10011 -p 11009:11009 -p 11010:11010 -p 8081:8081 boltz/regtest:1.3.0",
"docker:stop": "docker kill regtest && docker rm regtest",
"test": "npm run test:unit && npm run docker:start && npm run test:int && npm run docker:stop",
"test:nodocker": "npm run test:unit && npm run test:int",
Expand Down

0 comments on commit c51ffa7

Please sign in to comment.