def setUp(self): # As in TestChannel, set up 3 nodes self.net = regnet.create(datadir=None, cache=self.cache) self.alice, self.bob, self.carol = self.net[0], self.net[1], self.net[2] # Set up channels between so the network is Alice - Carol - Bob self.alice.lit.create(self.carol.lurl, 50000000, 50000000) self.propagate() self.bob.lit.create(self.carol.lurl, 50000000, 50000000) self.propagate()
def setUp(self): # Set up 3 nodes: Alice, Bob, and Carol self.net = regnet.create(datadir=None, cache=self.cache) self.alice, self.bob, self.carol = self.net[0], self.net[1], self.net[2]
def setUp(self): # Set up 3 nodes: Alice, Bob, and Carol self.net = regnet.create(datadir=None, cache=self.cache) self.alice, self.bob, self.carol = self.net[0], self.net[1], self.net[ 2]
balances() returns a tuple of Alice, Bob, and Carol's total balances Carol has so much money because she is the miner. Send 0.1 BTC from Alice to Bob on the lightning network >>> alice.lit.send(bob.lurl, 10000000) True Check balances: >>> balances() (89970000, 109980000, 199970000) Read test.py for more example usage. """ import test.regnet as regnet NET = regnet.create(datadir=None) NET.generate(101) NET.miner.bit.sendmany( "", { NET[0].bit.getnewaddress(): 100000000, NET[1].bit.getnewaddress(): 100000000, NET[2].bit.getnewaddress(): 200000000, }) NET.sync() alice, bob, carol = NET[0], NET[1], NET[2] alice.lit.create(carol.lurl, 50000000, 50000000) NET.generate() bob.lit.create(carol.lurl, 50000000, 50000000) NET.generate()
balances() returns a tuple of Alice, Bob, and Carol's total balances Carol has so much money because she is the miner. Send 0.1 BTC from Alice to Bob on the lightning network >>> alice.lit.send(bob.lurl, 10000000) True Check balances: >>> balances() (89970000, 109980000, 199970000) Read test.py for more example usage. """ import test.regnet as regnet NET = regnet.create(datadir=None) NET.generate(101) NET.miner.bit.sendmany( "", {NET[0].bit.getnewaddress(): 100000000, NET[1].bit.getnewaddress(): 100000000, NET[2].bit.getnewaddress(): 200000000, }) NET.sync() alice, bob, carol = NET[0], NET[1], NET[2] alice.lit.create(carol.lurl, 50000000, 50000000) NET.generate() bob.lit.create(carol.lurl, 50000000, 50000000) NET.generate() def balances():