mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
BIP68 support (nSequence enforcement)
The latest version of the BIP doesn't use inversion, but does use bitshifts. It also uncovered a bug in the test scripts: the block timestamps creep forward when we generate large numbers of blocks (UpdateTime insists it be > GetMedianTimePast() so it's valid). We need to take this into account when waiting for the median to move (reduced it from 60 to 30 seconds, since that adds about 14 seconds). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# Query bitcoind to get (first) unspent output to spend.
|
||||
# Generate a block.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -10,6 +10,10 @@ case $STYLE in
|
||||
alpha)
|
||||
# This is a one-shot in alpha, it seems.
|
||||
$CLI setgenerate true
|
||||
# Avoid median time bug by generating 11 blocks
|
||||
if [ -n "$INIT" ]; then
|
||||
for i in `seq 10`; do $CLI setgenerate true; done
|
||||
fi
|
||||
;;
|
||||
bitcoin)
|
||||
# Initially we need 100 blocks so coinbase matures, giving us funds.
|
||||
|
||||
Reference in New Issue
Block a user