forked from citp/testchain-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_chain.py
31 lines (26 loc) · 1.2 KB
/
generate_chain.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import argparse
from testchain.motifs.general import SetupChain, FinalizeChain
from testchain.motifs.change import Change
from testchain.motifs.motifs import Motifs
from testchain.motifs.addresses import Addresses
from testchain.motifs.special import SpecialCases
from testchain.motifs.taint import Taint
from testchain.motifs.heuristics import Heuristics
from testchain.motifs.cash import BitcoinCash
from testchain.runner import Runner
parser = argparse.ArgumentParser(description='Generate a synthetic blockchain.')
parser.add_argument('--output-dir', dest='output_dir', default="../files/", help='Output directory')
parser.add_argument('--chain', dest='chain', default="btc", help='Chain [btc, bch]')
parser.add_argument('--exec', dest='exec', default="bitcoind", help="Path to bitcoind executable")
args = parser.parse_args()
generator = Runner(args.output_dir, args.chain, args.exec)
generator.add_generator(SetupChain)
generator.add_generator(Addresses)
generator.add_generator(Motifs)
generator.add_generator(Change)
generator.add_generator(SpecialCases)
generator.add_generator(Taint)
generator.add_generator(Heuristics)
generator.add_generator(BitcoinCash)
generator.add_generator(FinalizeChain)
generator.run()