Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `sign_message` command to `cli_wallet` #1878

merged 8 commits into from Aug 7, 2019

Use head block num + time instead of dummy values

  • Loading branch information...
pmconrad committed Aug 5, 2019
commit b2a519d50ff72469334e3b43cedb2e1ff698a836
@@ -2274,13 +2274,14 @@ class wallet_api_impl
FC_ASSERT( !self.is_locked() );

const account_object from_account = get_account(signer);
auto dynamic_props = get_dynamic_global_properties();

signed_message msg;
msg.message = message;
msg.meta.account =;
msg.meta.memo_key = from_account.options.memo_key;
msg.meta.block = 0;
msg.meta.time = "1970-01-01T00:00:00Z";
msg.meta.block = dynamic_props.head_block_number;
msg.meta.time = dynamic_props.time.to_iso_string() + "Z";
msg.signature = get_private_key( from_account.options.memo_key ).sign_compact( msg.digest() );
return msg;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.