Fix build errors
This commit is contained in:
parent
4d176e73b2
commit
4a84892981
3 changed files with 17 additions and 4 deletions
|
|
@ -351,7 +351,7 @@ namespace graphene { namespace chain {
|
|||
/// The account which owns the delegate. This account pays the fee for this operation.
|
||||
account_id_type witness_account;
|
||||
string url;
|
||||
public_key_type block_signing_key;
|
||||
public_key_type block_signing_key;
|
||||
secret_hash_type initial_secret;
|
||||
|
||||
account_id_type fee_payer()const { return witness_account; }
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ graphene::chain::transaction_id_type graphene::chain::transaction::id() const
|
|||
memcpy(result._hash, hash._hash, std::min(sizeof(result), sizeof(hash)));
|
||||
return result;
|
||||
}
|
||||
|
||||
void graphene::chain::signed_transaction::sign(const private_key_type& key)
|
||||
{
|
||||
if( relative_expiration != 0 )
|
||||
|
|
@ -71,6 +72,15 @@ void graphene::chain::signed_transaction::sign(const private_key_type& key)
|
|||
signatures.push_back(key.sign_compact(digest()));
|
||||
}
|
||||
}
|
||||
|
||||
void transaction::set_expiration( fc::time_point_sec expiration_time )
|
||||
{
|
||||
ref_block_num = 0;
|
||||
relative_expiration = 0;
|
||||
ref_block_prefix = expiration_time.sec_since_epoch();
|
||||
block_id_cache.reset();
|
||||
}
|
||||
|
||||
void transaction::set_expiration( const block_id_type& reference_block, unsigned_int lifetime_intervals )
|
||||
{
|
||||
ref_block_num = boost::endian::endian_reverse(reference_block._hash[0]);
|
||||
|
|
|
|||
|
|
@ -70,9 +70,12 @@ BOOST_AUTO_TEST_CASE( two_node_network )
|
|||
trx.set_expiration(now + fc::seconds(30));
|
||||
std::shared_ptr<chain::database> db2 = app2.chain_database();
|
||||
|
||||
trx.operations.push_back(assert_operation({asset(),
|
||||
GRAPHENE_TEMP_ACCOUNT,
|
||||
{ fc::raw::pack( graphene::chain::pred::asset_symbol_eq_lit{asset_id_type(),"CORE"} ) } }));
|
||||
assert_operation op;
|
||||
op.fee_paying_account = GRAPHENE_TEMP_ACCOUNT;
|
||||
op.predicates.push_back( fc::raw::pack( graphene::chain::pred::asset_symbol_eq_lit{ asset_id_type(), "CORE" } ) );
|
||||
|
||||
trx.operations.push_back( std::move( op ) );
|
||||
|
||||
trx.validate();
|
||||
processed_transaction ptrx = app1.chain_database()->push_transaction(trx);
|
||||
app1.p2p_node()->broadcast(graphene::net::trx_message(trx));
|
||||
|
|
|
|||
Loading…
Reference in a new issue