[bitshares/bitshares-core] Issue867 Add CLI command to add signatures to a partially signed transaction (#1032)

jmjatlanta requested changes on this pull request.

I have not tested this code (will do so soon), but did find a few areas where you may want to fix the log messages…

> +
+ _multisig_mode = true;
+ }
+ else
+ _multisig_mode = false;
+
+ return _multisig_mode;
+ }
+
+ optional multisig_import_transaction(string tx_filename)
+ {
+ signed_transaction tmp;
+
+ if ( !fc::exists( tx_filename ) )
+ {
+ elog( «Transaction file not exists» );

How about «Transaction file does not exist»

> + {
+ fc::optional optional_private_key = wif_to_key( wif_key );
+
+ if ( !optional_private_key )
+ FC_THROW( «Invalid private key: ${i}», ( «i», wif_key ) );
+
+ private_keys.push_back(*optional_private_key);
+ }
+
+ for ( const fc::ecc::private_key& privkey : private_keys)
+ {
+ signature_type sig = privkey.sign_compact( _multisig_trx.sig_digest( _chain_id ) );
+ const vector &sigs = _multisig_trx.signatures;
+ if ( std::find( sigs.begin(), sigs.end(), sig ) != sigs.end() )
+ {
+ wlog( «signature of ${fn} had already exist, skip», ( «fn», key_to_wif( privkey ) ) );

How about «signature of ${fn} already exists, skipping.»

Добавить комментарий