message: fix iostream error on exit
diff: @@ -155,10 +155,6 @@ namespace eosio { namespace testing {
  void set_code( account_name name, const vector<uint8_t> wasm );
  void set_abi( account_name name, const char* abi_json );
  -
  - unique_ptr<controller> control;
  - std::map<chain::public_key_type, chain::private_key_type> block_signing_private_keys;
  -
  bool chain_has_transaction( const transaction_id_type& txid ) const;
  const transaction_receipt& get_transaction_receipt( const transaction_id_type& txid ) const;
  @@ -201,8 +197,12 @@ namespace eosio { namespace testing {
  template<typename Object>
  bool get_table_entry(Object& obj, account_name code, account_name scope, account_name table, uint64_t key, bool require = true) {
  auto* maybe_tid = find_table(code, scope, table);
  - if(maybe_tid == nullptr)
  - BOOST_FAIL("table for code=\"" + code.to_string() + "\" scope=\"" + scope.to_string() + "\" table=\"" + table.to_string() + "\" does not exist");
  + if( maybe_tid == nullptr ) {
  + BOOST_FAIL( "table for code=\"" + code.to_string()
  + + "\" scope=\"" + scope.to_string()
  + + "\" table=\"" + table.to_string()
  + + "\" does not exist" );
  + }
  auto* o = control->db().find<key_value_object, by_scope_primary>(boost::make_tuple(maybe_tid->id, key));
  if( o == nullptr ) {
  @@ -218,7 +218,15 @@ namespace eosio { namespace testing {
  protected:
  signed_block_ptr _produce_block( fc::microseconds skip_time, bool skip_pending_trxs = false, uint32_t skip_flag = 0 );
  +
  + // Fields:
  + protected:
  + // tempdir field must come before control so that during destruction the tempdir is deleted only after controller finishes
  fc::temp_directory tempdir;
  + public:
  + unique_ptr<controller> control;
  + std::map<chain::public_key_type, chain::private_key_type> block_signing_private_keys;
  + protected:
  controller::config cfg;
  map<transaction_id_type, transaction_receipt> chain_transactions;
  };
  