Documentation ¶
Index ¶
- func GetPaginatedAccountTxsKey(address []byte, currentPage int64) []byte
- func LoadAccount(m *MongoProcessor, address []byte, accounts map[string]*Account, ...)
- func ProtoToTransaction(tx *generated.Transaction, blockNumber uint64) (*Transaction, TransactionInterface)
- func ProtoToUnconfirmedTransaction(tx *generated.Transaction, seenTimestamp uint64) (*UnconfirmedTransaction, UnconfirmedTransactionInterface)
- type Account
- type Block
- type CoinBaseTransaction
- func (t *CoinBaseTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *CoinBaseTransaction) IsEqual(tx *CoinBaseTransaction) bool
- func (t *CoinBaseTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *CoinBaseTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *CoinBaseTransaction) TransactionFromPBData(tx *generated.Transaction)
- type MessageTransaction
- func (t *MessageTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *MessageTransaction) IsEqual(tx *MessageTransaction) bool
- func (t *MessageTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *MessageTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *MessageTransaction) TransactionFromPBData(tx *generated.Transaction)
- type MongoProcessor
- func (m *MongoProcessor) AccountProcessor(accounts map[string]*Account)
- func (m *MongoProcessor) BlockProcessor(b *block.Block) error
- func (m *MongoProcessor) CreateAccountsIndexes(found bool) error
- func (m *MongoProcessor) CreateBlocksIndexes(found bool) error
- func (m *MongoProcessor) CreateCleanUnconfirmedTransactionCollections() error
- func (m *MongoProcessor) CreateCoinBaseTxsIndexes(found bool) error
- func (m *MongoProcessor) CreateIndexes() error
- func (m *MongoProcessor) CreateMessageTxsIndexes(found bool) error
- func (m *MongoProcessor) CreatePaginatedAccountTxs(found bool) error
- func (m *MongoProcessor) CreateSlaveTxsIndexes(found bool) error
- func (m *MongoProcessor) CreateTokenTxsIndexes(found bool) error
- func (m *MongoProcessor) CreateTransactionsIndexes(found bool) error
- func (m *MongoProcessor) CreateTransferTokenTxsIndexes(found bool) error
- func (m *MongoProcessor) CreateTransferTxsIndexes(found bool) error
- func (m *MongoProcessor) CreateUnconfirmedMessageTxsIndexes() error
- func (m *MongoProcessor) CreateUnconfirmedSlaveTxsIndexes() error
- func (m *MongoProcessor) CreateUnconfirmedTokenTxsIndexes() error
- func (m *MongoProcessor) CreateUnconfirmedTransactionsIndexes() error
- func (m *MongoProcessor) CreateUnconfirmedTransferTokenTxsIndexes() error
- func (m *MongoProcessor) CreateUnconfirmedTransferTxsIndexes() error
- func (m *MongoProcessor) EmptyBulks()
- func (m *MongoProcessor) EmptyUnconfirmedTxBulks()
- func (m *MongoProcessor) ForkRecovery() error
- func (m *MongoProcessor) GetLastBlockFromDB() (*Block, error)
- func (m *MongoProcessor) IsAccountProcessed(blockNumber int64) bool
- func (m *MongoProcessor) IsCollectionExists(collectionName string) (bool, error)
- func (m *MongoProcessor) IsDataBaseExists(dbName string) (bool, error)
- func (m *MongoProcessor) PaginatedAccountTxsProcessor(accounts map[string]*Account, ...) error
- func (m *MongoProcessor) RemoveBlock(b *block.Block) error
- func (m *MongoProcessor) RemoveUnconfirmedTxn(tx *generated.Transaction)
- func (m *MongoProcessor) RevertCoinBaseTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, ...) error
- func (m *MongoProcessor) RevertMessageTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, ...) error
- func (m *MongoProcessor) RevertPaginatedAccountTxs(accounts map[string]*Account, ...) error
- func (m *MongoProcessor) RevertSlaveTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, ...) error
- func (m *MongoProcessor) RevertTokenTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, ...) error
- func (m *MongoProcessor) RevertTransaction(tx *generated.Transaction, blockNumber uint64, accounts map[string]*Account, ...)
- func (m *MongoProcessor) RevertTransferTokenTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, ...) error
- func (m *MongoProcessor) RevertTransferTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, ...) error
- func (m *MongoProcessor) Run()
- func (m *MongoProcessor) Sync() error
- func (m *MongoProcessor) TransactionProcessor(tx *generated.Transaction, blockNumber uint64, accounts map[string]*Account, ...)
- func (m *MongoProcessor) UnconfirmedTransactionProcessor(tx *generated.Transaction, seenTimestamp uint64)
- func (m *MongoProcessor) UpdateUnconfirmedTransactions()
- func (m *MongoProcessor) WriteAccounts() error
- func (m *MongoProcessor) WriteAll() error
- func (m *MongoProcessor) WriteBlocks() error
- func (m *MongoProcessor) WritePaginatedAccountTxs() error
- func (m *MongoProcessor) WriteTransactions() error
- func (m *MongoProcessor) WriteUnconfirmedTransactions() error
- type PaginatedAccountTxs
- type SlaveTransaction
- func (t *SlaveTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *SlaveTransaction) IsEqual(tx *SlaveTransaction) bool
- func (t *SlaveTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *SlaveTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *SlaveTransaction) TransactionFromPBData(tx *generated.Transaction)
- type TokenTransaction
- func (t *TokenTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *TokenTransaction) IsEqual(tx *TokenTransaction) bool
- func (t *TokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *TokenTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *TokenTransaction) TransactionFromPBData(tx *generated.Transaction)
- type Transaction
- func (t *Transaction) Apply(m *MongoProcessor, accounts map[string]*Account, ...)
- func (t *Transaction) IsEqual(tx *Transaction) bool
- func (t *Transaction) IsEqualPBData(tx *generated.Transaction, blockNumber uint64, txType int8) bool
- func (t *Transaction) Revert(m *MongoProcessor, accounts map[string]*Account, ...)
- func (t *Transaction) TransactionFromPBData(tx *generated.Transaction, blockNumber uint64, txType int8)
- type TransactionHashType
- type TransactionInterface
- type TransferTokenTransaction
- func (t *TransferTokenTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *TransferTokenTransaction) IsEqual(tx *TransferTokenTransaction) bool
- func (t *TransferTokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *TransferTokenTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *TransferTokenTransaction) TransactionFromPBData(tx *generated.Transaction)
- type TransferTransaction
- func (t *TransferTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *TransferTransaction) IsEqual(tx *TransferTransaction) bool
- func (t *TransferTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *TransferTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, ...)
- func (t *TransferTransaction) TransactionFromPBData(tx *generated.Transaction)
- type UnconfirmedMessageTransaction
- func (t *UnconfirmedMessageTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedMessageTransaction) IsEqual(tx *UnconfirmedMessageTransaction) bool
- func (t *UnconfirmedMessageTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *UnconfirmedMessageTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedMessageTransaction) TransactionFromPBData(tx *generated.Transaction)
- type UnconfirmedSlaveTransaction
- func (t *UnconfirmedSlaveTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedSlaveTransaction) IsEqual(tx *UnconfirmedSlaveTransaction) bool
- func (t *UnconfirmedSlaveTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *UnconfirmedSlaveTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedSlaveTransaction) TransactionFromPBData(tx *generated.Transaction)
- type UnconfirmedTokenTransaction
- func (t *UnconfirmedTokenTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedTokenTransaction) IsEqual(tx *UnconfirmedTokenTransaction) bool
- func (t *UnconfirmedTokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *UnconfirmedTokenTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedTokenTransaction) TransactionFromPBData(tx *generated.Transaction)
- type UnconfirmedTransaction
- func (t *UnconfirmedTransaction) Apply(m *MongoProcessor, txDetails UnconfirmedTransactionInterface)
- func (t *UnconfirmedTransaction) IsEqual(tx *UnconfirmedTransaction) bool
- func (t *UnconfirmedTransaction) IsEqualPBData(tx *generated.Transaction, seenTimestamp uint64, txType int8) bool
- func (t *UnconfirmedTransaction) Revert(m *MongoProcessor, txDetails UnconfirmedTransactionInterface)
- func (t *UnconfirmedTransaction) TransactionFromPBData(tx *generated.Transaction, seenTimestamp uint64, txType int8)
- type UnconfirmedTransactionInterface
- type UnconfirmedTransferTokenTransaction
- func (t *UnconfirmedTransferTokenTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedTransferTokenTransaction) IsEqual(tx *UnconfirmedTransferTokenTransaction) bool
- func (t *UnconfirmedTransferTokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *UnconfirmedTransferTokenTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedTransferTokenTransaction) TransactionFromPBData(tx *generated.Transaction)
- type UnconfirmedTransferTransaction
- func (t *UnconfirmedTransferTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedTransferTransaction) IsEqual(tx *UnconfirmedTransferTransaction) bool
- func (t *UnconfirmedTransferTransaction) IsEqualPBData(tx *generated.Transaction) bool
- func (t *UnconfirmedTransferTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
- func (t *UnconfirmedTransferTransaction) TransactionFromPBData(tx *generated.Transaction)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAccount ¶
func LoadAccount(m *MongoProcessor, address []byte, accounts map[string]*Account, blockNumber int64)
func ProtoToTransaction ¶
func ProtoToTransaction(tx *generated.Transaction, blockNumber uint64) (*Transaction, TransactionInterface)
func ProtoToUnconfirmedTransaction ¶
func ProtoToUnconfirmedTransaction(tx *generated.Transaction, seenTimestamp uint64) (*UnconfirmedTransaction, UnconfirmedTransactionInterface)
Types ¶
type Account ¶
type Account struct { Address []byte `json:"address" bson:"address"` Balance int64 `json:"balance" bson:"balance"` Nonce int64 `json:"nonce" bson:"nonce"` OTSBitfield [][]byte `json:"ots_bit_field" bson:"ots_bit_field"` OTSCounter int64 `json:"ots_counter" bson:"ots_counter"` BlockNumber int64 `json:"block_number" bson:"block_number"` Pages int64 `json:"pages" bson:"pages"` }
func CreateAccount ¶
func (*Account) AccountFromPBData ¶
func (a *Account) AccountFromPBData(pbData *generated.AddressState)
func (*Account) AddBalance ¶
func (*Account) ResetOTSKey ¶
func (*Account) SubBalance ¶
type Block ¶
type Block struct { HeaderHash []byte `json:"header_hash" bson:"header_hash"` BlockNumber int64 `json:"block_number" bson:"block_number"` Timestamp int64 `json:"timestamp" bson:"timestamp"` PrevHeaderHash []byte `json:"prev_header_hash" bson:"prev_header_hash"` BlockReward int64 `json:"block_reward" bson:"block_reward"` FeeReward int64 `json:"fee_reward" bson:"fee_reward"` MerkleRoot []byte `json:"merkle_root" bson:"merkle_root"` MiningNonce int32 `json:"mining_nonce" bson:"mining_nonce"` ExtraNonce int64 `json:"extra_nonce" bson:"extra_nonce"` }
func (*Block) BlockFromPBData ¶
type CoinBaseTransaction ¶
type CoinBaseTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` AddressTo []byte `json:"address_to" bson:"address_to"` Amount int64 `json:"amount" bson:"amount"` }
func (*CoinBaseTransaction) Apply ¶
func (t *CoinBaseTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*CoinBaseTransaction) IsEqual ¶
func (t *CoinBaseTransaction) IsEqual(tx *CoinBaseTransaction) bool
func (*CoinBaseTransaction) IsEqualPBData ¶
func (t *CoinBaseTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*CoinBaseTransaction) Revert ¶
func (t *CoinBaseTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*CoinBaseTransaction) TransactionFromPBData ¶
func (t *CoinBaseTransaction) TransactionFromPBData(tx *generated.Transaction)
type MessageTransaction ¶
type MessageTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` MessageHash []byte `json:"message_hash" bson:"message_hash"` }
func (*MessageTransaction) Apply ¶
func (t *MessageTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*MessageTransaction) IsEqual ¶
func (t *MessageTransaction) IsEqual(tx *MessageTransaction) bool
func (*MessageTransaction) IsEqualPBData ¶
func (t *MessageTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*MessageTransaction) Revert ¶
func (t *MessageTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*MessageTransaction) TransactionFromPBData ¶
func (t *MessageTransaction) TransactionFromPBData(tx *generated.Transaction)
type MongoProcessor ¶
type MongoProcessor struct { Exit chan struct{} LoopWG sync.WaitGroup // contains filtered or unexported fields }
func CreateMongoProcessor ¶
func CreateMongoProcessor(dbName string, chain *chain.Chain) (*MongoProcessor, error)
func (*MongoProcessor) AccountProcessor ¶
func (m *MongoProcessor) AccountProcessor(accounts map[string]*Account)
func (*MongoProcessor) BlockProcessor ¶
func (m *MongoProcessor) BlockProcessor(b *block.Block) error
func (*MongoProcessor) CreateAccountsIndexes ¶
func (m *MongoProcessor) CreateAccountsIndexes(found bool) error
func (*MongoProcessor) CreateBlocksIndexes ¶
func (m *MongoProcessor) CreateBlocksIndexes(found bool) error
func (*MongoProcessor) CreateCleanUnconfirmedTransactionCollections ¶
func (m *MongoProcessor) CreateCleanUnconfirmedTransactionCollections() error
func (*MongoProcessor) CreateCoinBaseTxsIndexes ¶
func (m *MongoProcessor) CreateCoinBaseTxsIndexes(found bool) error
func (*MongoProcessor) CreateIndexes ¶
func (m *MongoProcessor) CreateIndexes() error
func (*MongoProcessor) CreateMessageTxsIndexes ¶
func (m *MongoProcessor) CreateMessageTxsIndexes(found bool) error
func (*MongoProcessor) CreatePaginatedAccountTxs ¶
func (m *MongoProcessor) CreatePaginatedAccountTxs(found bool) error
func (*MongoProcessor) CreateSlaveTxsIndexes ¶
func (m *MongoProcessor) CreateSlaveTxsIndexes(found bool) error
func (*MongoProcessor) CreateTokenTxsIndexes ¶
func (m *MongoProcessor) CreateTokenTxsIndexes(found bool) error
func (*MongoProcessor) CreateTransactionsIndexes ¶
func (m *MongoProcessor) CreateTransactionsIndexes(found bool) error
func (*MongoProcessor) CreateTransferTokenTxsIndexes ¶
func (m *MongoProcessor) CreateTransferTokenTxsIndexes(found bool) error
func (*MongoProcessor) CreateTransferTxsIndexes ¶
func (m *MongoProcessor) CreateTransferTxsIndexes(found bool) error
func (*MongoProcessor) CreateUnconfirmedMessageTxsIndexes ¶
func (m *MongoProcessor) CreateUnconfirmedMessageTxsIndexes() error
func (*MongoProcessor) CreateUnconfirmedSlaveTxsIndexes ¶
func (m *MongoProcessor) CreateUnconfirmedSlaveTxsIndexes() error
func (*MongoProcessor) CreateUnconfirmedTokenTxsIndexes ¶
func (m *MongoProcessor) CreateUnconfirmedTokenTxsIndexes() error
func (*MongoProcessor) CreateUnconfirmedTransactionsIndexes ¶
func (m *MongoProcessor) CreateUnconfirmedTransactionsIndexes() error
func (*MongoProcessor) CreateUnconfirmedTransferTokenTxsIndexes ¶
func (m *MongoProcessor) CreateUnconfirmedTransferTokenTxsIndexes() error
func (*MongoProcessor) CreateUnconfirmedTransferTxsIndexes ¶
func (m *MongoProcessor) CreateUnconfirmedTransferTxsIndexes() error
func (*MongoProcessor) EmptyBulks ¶
func (m *MongoProcessor) EmptyBulks()
func (*MongoProcessor) EmptyUnconfirmedTxBulks ¶
func (m *MongoProcessor) EmptyUnconfirmedTxBulks()
func (*MongoProcessor) ForkRecovery ¶
func (m *MongoProcessor) ForkRecovery() error
func (*MongoProcessor) GetLastBlockFromDB ¶
func (m *MongoProcessor) GetLastBlockFromDB() (*Block, error)
func (*MongoProcessor) IsAccountProcessed ¶
func (m *MongoProcessor) IsAccountProcessed(blockNumber int64) bool
func (*MongoProcessor) IsCollectionExists ¶
func (m *MongoProcessor) IsCollectionExists(collectionName string) (bool, error)
func (*MongoProcessor) IsDataBaseExists ¶
func (m *MongoProcessor) IsDataBaseExists(dbName string) (bool, error)
func (*MongoProcessor) PaginatedAccountTxsProcessor ¶
func (m *MongoProcessor) PaginatedAccountTxsProcessor(accounts map[string]*Account, accountTxHashes map[string][]*TransactionHashType) error
func (*MongoProcessor) RemoveBlock ¶
func (m *MongoProcessor) RemoveBlock(b *block.Block) error
func (*MongoProcessor) RemoveUnconfirmedTxn ¶
func (m *MongoProcessor) RemoveUnconfirmedTxn(tx *generated.Transaction)
func (*MongoProcessor) RevertCoinBaseTransaction ¶
func (m *MongoProcessor) RevertCoinBaseTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) error
func (*MongoProcessor) RevertMessageTransaction ¶
func (m *MongoProcessor) RevertMessageTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) error
func (*MongoProcessor) RevertPaginatedAccountTxs ¶
func (m *MongoProcessor) RevertPaginatedAccountTxs(accounts map[string]*Account, accountTxHashes map[string][]*TransactionHashType) error
func (*MongoProcessor) RevertSlaveTransaction ¶
func (m *MongoProcessor) RevertSlaveTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) error
func (*MongoProcessor) RevertTokenTransaction ¶
func (m *MongoProcessor) RevertTokenTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) error
func (*MongoProcessor) RevertTransaction ¶
func (m *MongoProcessor) RevertTransaction(tx *generated.Transaction, blockNumber uint64, accounts map[string]*Account, paginatedAccountTxs map[string][]*TransactionHashType)
func (*MongoProcessor) RevertTransferTokenTransaction ¶
func (m *MongoProcessor) RevertTransferTokenTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) error
func (*MongoProcessor) RevertTransferTransaction ¶
func (m *MongoProcessor) RevertTransferTransaction(tx *Transaction, accounts map[string]*Account, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) error
func (*MongoProcessor) Run ¶
func (m *MongoProcessor) Run()
func (*MongoProcessor) Sync ¶
func (m *MongoProcessor) Sync() error
func (*MongoProcessor) TransactionProcessor ¶
func (m *MongoProcessor) TransactionProcessor(tx *generated.Transaction, blockNumber uint64, accounts map[string]*Account, paginatedAccountTxs map[string][]*TransactionHashType)
func (*MongoProcessor) UnconfirmedTransactionProcessor ¶
func (m *MongoProcessor) UnconfirmedTransactionProcessor(tx *generated.Transaction, seenTimestamp uint64)
func (*MongoProcessor) UpdateUnconfirmedTransactions ¶
func (m *MongoProcessor) UpdateUnconfirmedTransactions()
func (*MongoProcessor) WriteAccounts ¶
func (m *MongoProcessor) WriteAccounts() error
func (*MongoProcessor) WriteAll ¶
func (m *MongoProcessor) WriteAll() error
func (*MongoProcessor) WriteBlocks ¶
func (m *MongoProcessor) WriteBlocks() error
func (*MongoProcessor) WritePaginatedAccountTxs ¶
func (m *MongoProcessor) WritePaginatedAccountTxs() error
func (*MongoProcessor) WriteTransactions ¶
func (m *MongoProcessor) WriteTransactions() error
func (*MongoProcessor) WriteUnconfirmedTransactions ¶
func (m *MongoProcessor) WriteUnconfirmedTransactions() error
type PaginatedAccountTxs ¶
type SlaveTransaction ¶
type SlaveTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` SlavePKs [][]byte `json:"slave_public_keys" bson:"slave_public_keys"` AccessTypes []int32 `json:"access_types" bson:"access_types"` }
func (*SlaveTransaction) Apply ¶
func (t *SlaveTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*SlaveTransaction) IsEqual ¶
func (t *SlaveTransaction) IsEqual(tx *SlaveTransaction) bool
func (*SlaveTransaction) IsEqualPBData ¶
func (t *SlaveTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*SlaveTransaction) Revert ¶
func (t *SlaveTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*SlaveTransaction) TransactionFromPBData ¶
func (t *SlaveTransaction) TransactionFromPBData(tx *generated.Transaction)
type TokenTransaction ¶
type TokenTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` Symbol []byte `json:"symbol" bson:"symbol"` SymbolStr string `json:"symbol" bson:"symbol_str"` Name []byte `json:"name" bson:"name"` NameStr string `json:"symbol" bson:"name_str"` Owner []byte `json:"owner" bson:"owner"` Decimals int64 `json:"decimals" bson:"decimals"` AddressesTo [][]byte `json:"addresses_to" bson:"addresses_to"` Amounts []int64 `json:"amounts" bson:"amounts"` }
func (*TokenTransaction) Apply ¶
func (t *TokenTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*TokenTransaction) IsEqual ¶
func (t *TokenTransaction) IsEqual(tx *TokenTransaction) bool
func (*TokenTransaction) IsEqualPBData ¶
func (t *TokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*TokenTransaction) Revert ¶
func (t *TokenTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*TokenTransaction) TransactionFromPBData ¶
func (t *TokenTransaction) TransactionFromPBData(tx *generated.Transaction)
type Transaction ¶
type Transaction struct { MasterAddress []byte `json:"master_address" bson:"master_address"` Fee int64 `json:"fee" bson:"fee"` AddressFrom []byte `json:"address_from" bson:"address_from"` PublicKey []byte `json:"public_key" bson:"public_key"` Signature []byte `json:"signature" bson:"signature"` Nonce int64 `json:"nonce" bson:"nonce"` TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` TransactionType int8 `json:"transaction_type" bson:"transaction_type"` BlockNumber int64 `json:"block_number" bson:"block_number"` }
func (*Transaction) Apply ¶
func (t *Transaction) Apply(m *MongoProcessor, accounts map[string]*Account, txDetails TransactionInterface, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*Transaction) IsEqual ¶
func (t *Transaction) IsEqual(tx *Transaction) bool
func (*Transaction) IsEqualPBData ¶
func (t *Transaction) IsEqualPBData(tx *generated.Transaction, blockNumber uint64, txType int8) bool
func (*Transaction) Revert ¶
func (t *Transaction) Revert(m *MongoProcessor, accounts map[string]*Account, txDetails TransactionInterface, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*Transaction) TransactionFromPBData ¶
func (t *Transaction) TransactionFromPBData(tx *generated.Transaction, blockNumber uint64, txType int8)
type TransactionHashType ¶
type TransactionInterface ¶
type TransactionInterface interface { TransactionFromPBData(tx *generated.Transaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType) }
type TransferTokenTransaction ¶
type TransferTokenTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` TokenTxnHash []byte `json:"token_txn_hash" bson:"token_txn_hash"` AddressesTo [][]byte `json:"addresses_to" bson:"addresses_to"` Amounts []int64 `json:"amounts" bson:"amounts"` }
func (*TransferTokenTransaction) Apply ¶
func (t *TransferTokenTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*TransferTokenTransaction) IsEqual ¶
func (t *TransferTokenTransaction) IsEqual(tx *TransferTokenTransaction) bool
func (*TransferTokenTransaction) IsEqualPBData ¶
func (t *TransferTokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*TransferTokenTransaction) Revert ¶
func (t *TransferTokenTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*TransferTokenTransaction) TransactionFromPBData ¶
func (t *TransferTokenTransaction) TransactionFromPBData(tx *generated.Transaction)
type TransferTransaction ¶
type TransferTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` AddressesTo [][]byte `json:"addresses_to" bson:"addresses_to"` Amounts []int64 `json:"amounts" bson:"amounts"` }
func (*TransferTransaction) Apply ¶
func (t *TransferTransaction) Apply(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*TransferTransaction) IsEqual ¶
func (t *TransferTransaction) IsEqual(tx *TransferTransaction) bool
func (*TransferTransaction) IsEqualPBData ¶
func (t *TransferTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*TransferTransaction) Revert ¶
func (t *TransferTransaction) Revert(m *MongoProcessor, accounts map[string]*Account, masterAddress []byte, addressFrom []byte, blockNumber int64, paginatedAccountTxs map[string][]*TransactionHashType)
func (*TransferTransaction) TransactionFromPBData ¶
func (t *TransferTransaction) TransactionFromPBData(tx *generated.Transaction)
type UnconfirmedMessageTransaction ¶
type UnconfirmedMessageTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` MessageHash []byte `json:"message_hash" bson:"message_hash"` }
func (*UnconfirmedMessageTransaction) Apply ¶
func (t *UnconfirmedMessageTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedMessageTransaction) IsEqual ¶
func (t *UnconfirmedMessageTransaction) IsEqual(tx *UnconfirmedMessageTransaction) bool
func (*UnconfirmedMessageTransaction) IsEqualPBData ¶
func (t *UnconfirmedMessageTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*UnconfirmedMessageTransaction) Revert ¶
func (t *UnconfirmedMessageTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedMessageTransaction) TransactionFromPBData ¶
func (t *UnconfirmedMessageTransaction) TransactionFromPBData(tx *generated.Transaction)
type UnconfirmedSlaveTransaction ¶
type UnconfirmedSlaveTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` SlavePKs [][]byte `json:"slave_public_keys" bson:"slave_public_keys"` AccessTypes []int32 `json:"access_types" bson:"access_types"` }
func (*UnconfirmedSlaveTransaction) Apply ¶
func (t *UnconfirmedSlaveTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedSlaveTransaction) IsEqual ¶
func (t *UnconfirmedSlaveTransaction) IsEqual(tx *UnconfirmedSlaveTransaction) bool
func (*UnconfirmedSlaveTransaction) IsEqualPBData ¶
func (t *UnconfirmedSlaveTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*UnconfirmedSlaveTransaction) Revert ¶
func (t *UnconfirmedSlaveTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedSlaveTransaction) TransactionFromPBData ¶
func (t *UnconfirmedSlaveTransaction) TransactionFromPBData(tx *generated.Transaction)
type UnconfirmedTokenTransaction ¶
type UnconfirmedTokenTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` Symbol []byte `json:"symbol" bson:"symbol"` SymbolStr string `json:"symbol" bson:"symbol_str"` Name []byte `json:"name" bson:"name"` NameStr string `json:"symbol" bson:"name_str"` Owner []byte `json:"owner" bson:"owner"` Decimals int64 `json:"decimals" bson:"decimals"` AddressesTo [][]byte `json:"addresses_to" bson:"addresses_to"` Amounts []int64 `json:"amounts" bson:"amounts"` }
func (*UnconfirmedTokenTransaction) Apply ¶
func (t *UnconfirmedTokenTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedTokenTransaction) IsEqual ¶
func (t *UnconfirmedTokenTransaction) IsEqual(tx *UnconfirmedTokenTransaction) bool
func (*UnconfirmedTokenTransaction) IsEqualPBData ¶
func (t *UnconfirmedTokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*UnconfirmedTokenTransaction) Revert ¶
func (t *UnconfirmedTokenTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedTokenTransaction) TransactionFromPBData ¶
func (t *UnconfirmedTokenTransaction) TransactionFromPBData(tx *generated.Transaction)
type UnconfirmedTransaction ¶
type UnconfirmedTransaction struct { MasterAddress []byte `json:"master_address" bson:"master_address"` Fee int64 `json:"fee" bson:"fee"` AddressFrom []byte `json:"address_from" bson:"address_from"` PublicKey []byte `json:"public_key" bson:"public_key"` Signature []byte `json:"signature" bson:"signature"` Nonce int64 `json:"nonce" bson:"nonce"` TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` TransactionType int8 `json:"transaction_type" bson:"transaction_type"` SeenTimestamp int64 `json:"seen_timestamp" bson:"seen_timestamp"` }
func (*UnconfirmedTransaction) Apply ¶
func (t *UnconfirmedTransaction) Apply(m *MongoProcessor, txDetails UnconfirmedTransactionInterface)
func (*UnconfirmedTransaction) IsEqual ¶
func (t *UnconfirmedTransaction) IsEqual(tx *UnconfirmedTransaction) bool
func (*UnconfirmedTransaction) IsEqualPBData ¶
func (t *UnconfirmedTransaction) IsEqualPBData(tx *generated.Transaction, seenTimestamp uint64, txType int8) bool
func (*UnconfirmedTransaction) Revert ¶
func (t *UnconfirmedTransaction) Revert(m *MongoProcessor, txDetails UnconfirmedTransactionInterface)
func (*UnconfirmedTransaction) TransactionFromPBData ¶
func (t *UnconfirmedTransaction) TransactionFromPBData(tx *generated.Transaction, seenTimestamp uint64, txType int8)
type UnconfirmedTransactionInterface ¶
type UnconfirmedTransactionInterface interface { TransactionFromPBData(tx *generated.Transaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte) }
type UnconfirmedTransferTokenTransaction ¶
type UnconfirmedTransferTokenTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` TokenTxnHash []byte `json:"token_txn_hash" bson:"token_txn_hash"` AddressesTo [][]byte `json:"addresses_to" bson:"addresses_to"` Amounts []int64 `json:"amounts" bson:"amounts"` }
func (*UnconfirmedTransferTokenTransaction) Apply ¶
func (t *UnconfirmedTransferTokenTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedTransferTokenTransaction) IsEqual ¶
func (t *UnconfirmedTransferTokenTransaction) IsEqual(tx *UnconfirmedTransferTokenTransaction) bool
func (*UnconfirmedTransferTokenTransaction) IsEqualPBData ¶
func (t *UnconfirmedTransferTokenTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*UnconfirmedTransferTokenTransaction) Revert ¶
func (t *UnconfirmedTransferTokenTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedTransferTokenTransaction) TransactionFromPBData ¶
func (t *UnconfirmedTransferTokenTransaction) TransactionFromPBData(tx *generated.Transaction)
type UnconfirmedTransferTransaction ¶
type UnconfirmedTransferTransaction struct { TransactionHash []byte `json:"transaction_hash" bson:"transaction_hash"` AddressesTo [][]byte `json:"addresses_to" bson:"addresses_to"` Amounts []int64 `json:"amounts" bson:"amounts"` }
func (*UnconfirmedTransferTransaction) Apply ¶
func (t *UnconfirmedTransferTransaction) Apply(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedTransferTransaction) IsEqual ¶
func (t *UnconfirmedTransferTransaction) IsEqual(tx *UnconfirmedTransferTransaction) bool
func (*UnconfirmedTransferTransaction) IsEqualPBData ¶
func (t *UnconfirmedTransferTransaction) IsEqualPBData(tx *generated.Transaction) bool
func (*UnconfirmedTransferTransaction) Revert ¶
func (t *UnconfirmedTransferTransaction) Revert(m *MongoProcessor, masterAddress []byte, addressFrom []byte)
func (*UnconfirmedTransferTransaction) TransactionFromPBData ¶
func (t *UnconfirmedTransferTransaction) TransactionFromPBData(tx *generated.Transaction)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.