Skip to content

Commit

Permalink
test: added fn_sync_genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
delbonis committed Jul 25, 2024
1 parent 1f37077 commit 7efb4b5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/fn_sync_genesis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import time

from bitcoinlib.services.bitcoind import BitcoindClient
import flexitest

UNSET_ID = "0000000000000000000000000000000000000000000000000000000000000000"


@flexitest.register
class SyncGenesisTest(flexitest.Test):
def __init__(self, ctx: flexitest.InitContext):
ctx.set_env("basic")

def main(self, ctx: flexitest.RunContext):
btc = ctx.get_service("bitcoin")
seq = ctx.get_service("sequencer")

# create both btc and sequencer RPC
seqrpc = seq.create_rpc()

time.sleep(1)

stat = None
for _ in range(10):
stat = seqrpc.alp_clientStatus()
print(stat)
time.sleep(1)

assert stat["finalized_blkid"] != UNSET_SET, "did not notice genesis"

0 comments on commit 7efb4b5

Please sign in to comment.