forked from steemit/steem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from steemit/master
20180912
- Loading branch information
Showing
27 changed files
with
302 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
libraries/chain/include/steem/chain/block_notification.hpp
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#pragma once | ||
|
||
#include <steem/protocol/block.hpp> | ||
|
||
namespace steem { namespace chain { | ||
|
||
struct block_notification | ||
{ | ||
block_notification( const steem::protocol::signed_block& b ) : block(b) | ||
{ | ||
block_id = b.id(); | ||
block_num = block_header::num_from_id( block_id ); | ||
} | ||
|
||
steem::protocol::block_id_type block_id; | ||
uint32_t block_num = 0; | ||
const steem::protocol::signed_block& block; | ||
}; | ||
|
||
struct transaction_notification | ||
{ | ||
transaction_notification( const steem::protocol::signed_transaction& tx ) : transaction(tx) | ||
{ | ||
transaction_id = tx.id(); | ||
} | ||
|
||
steem::protocol::transaction_id_type transaction_id; | ||
const steem::protocol::signed_transaction& transaction; | ||
}; | ||
|
||
struct operation_notification | ||
{ | ||
operation_notification( const operation& o ) : op(o) {} | ||
|
||
transaction_id_type trx_id; | ||
uint32_t block = 0; | ||
uint32_t trx_in_block = 0; | ||
uint32_t op_in_trx = 0; | ||
uint32_t virtual_op = 0; | ||
const operation& op; | ||
}; | ||
|
||
struct required_action_notification | ||
{ | ||
required_action_notification( const required_automated_action& a ) : action(a) {} | ||
|
||
const required_automated_action& action; | ||
}; | ||
|
||
struct optional_action_notification | ||
{ | ||
optional_action_notification( const optional_automated_action& a ) : action(a) {} | ||
|
||
const optional_automated_action& action; | ||
}; | ||
|
||
} } |
21 changes: 0 additions & 21 deletions
21
libraries/chain/include/steem/chain/operation_notification.hpp
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
libraries/chain/include/steem/chain/pending_optional_action_object.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
#include <steem/protocol/required_automated_actions.hpp> | ||
|
||
#include <steem/chain/steem_object_types.hpp> | ||
|
||
#include <boost/multi_index/composite_key.hpp> | ||
|
||
namespace steem { namespace chain { | ||
|
||
using steem::protocol::optional_automated_action; | ||
|
||
class pending_optional_action_object : public object< pending_optional_action_object_type, pending_optional_action_object > | ||
{ | ||
pending_optional_action_object() = delete; | ||
|
||
public: | ||
template< typename Constructor, typename Allocator > | ||
pending_optional_action_object( Constructor&& c, allocator< Allocator > a ) | ||
{ | ||
c( *this ); | ||
} | ||
|
||
id_type id; | ||
|
||
optional_automated_action action; | ||
}; | ||
|
||
typedef multi_index_container< | ||
pending_optional_action_object, | ||
indexed_by< | ||
ordered_unique< tag< by_id >, member< pending_optional_action_object, pending_optional_action_id_type, &pending_optional_action_object::id > > | ||
>, | ||
allocator< pending_optional_action_object > | ||
> pending_optional_action_index; | ||
|
||
} } //steem::chain | ||
|
||
FC_REFLECT( steem::chain::pending_optional_action_object, | ||
(id)(action) ) | ||
CHAINBASE_SET_INDEX_TYPE( steem::chain::pending_optional_action_object, steem::chain::pending_optional_action_index ) |
40 changes: 40 additions & 0 deletions
40
libraries/chain/include/steem/chain/pending_required_action_object.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
#include <steem/protocol/required_automated_actions.hpp> | ||
|
||
#include <steem/chain/steem_object_types.hpp> | ||
|
||
#include <boost/multi_index/composite_key.hpp> | ||
|
||
namespace steem { namespace chain { | ||
|
||
using steem::protocol::required_automated_action; | ||
|
||
class pending_required_action_object : public object< pending_required_action_object_type, pending_required_action_object > | ||
{ | ||
pending_required_action_object() = delete; | ||
|
||
public: | ||
template< typename Constructor, typename Allocator > | ||
pending_required_action_object( Constructor&& c, allocator< Allocator > a ) | ||
{ | ||
c( *this ); | ||
} | ||
|
||
id_type id; | ||
|
||
required_automated_action action; | ||
}; | ||
|
||
typedef multi_index_container< | ||
pending_required_action_object, | ||
indexed_by< | ||
ordered_unique< tag< by_id >, member< pending_required_action_object, pending_required_action_id_type, &pending_required_action_object::id > > | ||
>, | ||
allocator< pending_required_action_object > | ||
> pending_required_action_index; | ||
|
||
} } //steem::chain | ||
|
||
FC_REFLECT( steem::chain::pending_required_action_object, | ||
(id)(action) ) | ||
CHAINBASE_SET_INDEX_TYPE( steem::chain::pending_required_action_object, steem::chain::pending_required_action_index ) |
Oops, something went wrong.