message: check before update
diff: @@ -3,7 +3,7 @@ import time
  import wallet
  import eosapi
  import initeos
  -
  +import database_api
  from common import init_, producer
  print('please make sure you are running the following command before test')
  @@ -26,9 +26,17 @@ def test(name=None):
  @init
  def deploy():
  src_dir = os.path.dirname(os.path.abspath(__file__))
  - file_name = 'garden.py'
  + libs = ('asset.py', 'cache.py', 'storage.py', 'garden.py')
  + code = eosapi.N('backyard')
  + for file_name in libs:
  src_code = open(os.path.join(src_dir, file_name), 'rb').read()
  + src_id = eosapi.hash64(file_name, 0)
  + itr = database_api.find_i64(code, code, code, src_id)
  + if itr >= 0:
  + old_src = database_api.get_i64(itr)
  + if old_src[1:] == src_code:
  + continue
  mod_name = file_name
  msg = int.to_bytes(len(mod_name), 1, 'little')
  msg += mod_name.encode('utf8')
  @@ -44,9 +52,17 @@ def deploy():
  @init
  def deploy_mpy():
  src_dir = os.path.dirname(os.path.abspath(__file__))
  - file_name = 'garden.py'
  -
  + libs = ('asset.py', 'cache.py', 'storage.py', 'garden.py')
  + code = eosapi.N('backyard')
  + for file_name in libs:
  src_code = eosapi.mp_compile(os.path.join(src_dir, file_name))
  + src_id = eosapi.hash64(file_name, 0)
  + itr = database_api.find_i64(code, code, code, src_id)
  + if itr >= 0:
  + old_src = database_api.get_i64(itr)
  + if old_src[1:] == src_code:
  + continue
  +
  file_name = file_name.replace('.py', '.mpy')
  mod_name = file_name
  msg = int.to_bytes(len(mod_name), 1, 'little')
  