Rusty Russell
f510e29e22
alpha: switch over to Elements Alpha by default.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
c660629760
test.sh: (alpha) make sure that spending tx fails too soon, succeeds after delay.
This only makes sense when we have CSV support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
4011f7ae7c
create-commit-spend-tx: set alpha fields, and input locktime.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
20bb6c65aa
protocol fix: use locktime from *other* side.
Which emerged clearly when setting one side's locktime differently than
the other.
Each side specifies the (minimum) time they need to notice a fraud attempt:
this constrains the *other* side.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
1075264c66
close_tx: initialize fee and input amount fields.
Required for alpha.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
90e4160862
test.sh: handle appended amounts in transactions.
cut -d: -f1 gets just the transactions, or passed through if no ":".
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
ae31431168
tx: centralize transaction writing, append amounts for alpha.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
5dc9cd16f9
create-steal-tx: actually output the steal tx, not the commit tx!
... Which reveals it wasn't paying a fee. So update fix that, and
initialize the alpha tx fields while we're there.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
9851436d4d
test.sh: restore --steal and --unilateral options
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
d20ddb5a90
Use libsecp256k1 instead of openssl for crypto.
We still use openssl for bignums (base58) and for ripemd.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
27e7c7b986
scripts/setup.sh: setup helper script.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
783aa35aa6
Make test.sh inputs script arguments.
Hardcoding my defaults isn't useful. Even for me.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
f38382fd3c
test.sh: handle variances in bitcoin-cli formatting.
In particular, there may or may not be a space between "pubkey" and :.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
8f4426e09b
scripts: move to scripts/ subdir, prepare for alpha.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
733e655d17
getinput.sh: abstract out bitcoin-cli command.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
0666265b5e
HOWTO-USE.md: poor documentation for poor tools.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
98b1d478b1
test-cli: remove obsolete examples from program headers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
d4a6fb8b2d
Add test script.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
924be8456e
create-commit-spend-tx: fix locktime, take into account updates.
We were using o2's locktime instead of o1's, and we didn't take
into account updates.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
a700a5cdca
create-commit-tx: allow creation of initial opening tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
92ec2f874b
pkt: add pkt_totlen() helper.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
77387bb370
test-cli/create-commit-spend-tx: don't endian convert script_len.
That's done in mashalling and hashing code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
6389dbd455
protocol: restore locktime in blocks option.
This could be used by an always-on node to agressively shorten their timeouts.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
4e8eda47a1
Move hacky command line utils out to test-cli subdir.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago