diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e4664ef18..1b52f15f5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,8 @@ All notable changes to this project are documented in this file. - Adds option to enter arguments for smart contract in an 'interactive' mode, which allows for much better parsing of input, activated by passing the ``--i`` flag when invoking. - Adds ability to *not* parse address strings such as AeV59NyZtgj5AMQ7vY6yhr2MRvcfFeLWSb when inputting to smart contract by passing the ``--no-parse`` flag - Changes the structure of items dispatched in SmartContractEvents to use the ``ContractParameter`` interface for better type inference and variable usage. +- Bugfix: np-api-server with open wallet now properly processes new blocks + [0.7.2] 2018-06-21 ------------------- diff --git a/neo/bin/api_server.py b/neo/bin/api_server.py index ef4c2f4d5..9a1eebfdb 100755 --- a/neo/bin/api_server.py +++ b/neo/bin/api_server.py @@ -201,6 +201,7 @@ def main(): password_key = to_aes_key(passwd) try: wallet = UserWallet.Open(args.wallet, password_key) + except Exception as e: print(f"Could not open wallet {e}") return @@ -223,6 +224,11 @@ def main(): dbloop = task.LoopingCall(Blockchain.Default().PersistBlocks) dbloop.start(.1) + # If a wallet is open, make sure it processes blocks + if wallet: + walletdb_loop = task.LoopingCall(wallet.ProcessBlocks) + walletdb_loop.start(1) + # Setup twisted reactor, NodeLeader and start the NotificationDB reactor.suggestThreadPoolSize(15) NodeLeader.Instance().Start()