def test_follow_posting_key(self): nodelist = NodeList() stm = Crea(node=self.nodes, keys=[self.posting_key], nobroadcast=True, expiration=120, num_retries=10) account = Account("crea", crea_instance=stm) account.follow("crea1")
owner_privkey = owner_key.get_private_key() memo_privkey = memo_key.get_private_key() if useWallet: stm.wallet.addPrivateKey(owner_privkey) stm.wallet.addPrivateKey(active_privkey) stm.wallet.addPrivateKey(memo_privkey) stm.wallet.addPrivateKey(posting_privkey) else: stm = Crea(node=testnet_node, wif={'active': str(active_privkey), 'posting': str(posting_privkey), 'memo': str(memo_privkey)}) account = Account(username, crea_instance=stm) if account["name"] == "crea": account.disallow("crea1", permission='posting') account.allow('crea1', weight=1, permission='posting', account=None) account.follow("crea1") elif account["name"] == "crea5": account.allow('crea4', weight=2, permission='active', account=None) if useWallet: stm.wallet.getAccountFromPrivateKey(str(active_privkey)) # stm.create_account("crea1", creator=account, password=password1) account1 = Account("crea1", crea_instance=stm) b = Blockchain(crea_instance=stm) blocknum = b.get_current_block().identifier account.transfer("crea1", 1, "CBD", "test") b1 = Block(blocknum, crea_instance=stm)