parser

package
v0.0.0-...-b7062c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2017 License: LGPL-3.0-or-later Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressToID

func AddressToID(input string) (addr int64)

AddressToID converts the string representation of the wallet number to a numeric

func CheckSignature

func CheckSignature(i *map[string]interface{}, name string) error

CheckSignature checks the additional signatures for the contract

func ClearTmp

func ClearTmp(blocks map[int64]string)

ClearTmp deletes temporary files

func ContractConditions

func ContractConditions(p *Parser, names ...interface{}) (bool, error)

ContractConditions calls the 'conditions' function for each of the contracts specified in the parameters

func DBAmount

func DBAmount(tblname, column string, id int64) decimal.Decimal

DBAmount returns the value of the 'amount' column for the record with the 'id' value in the 'column' column

func DBFreeRequest

func DBFreeRequest(p *Parser, tblname string, id interface{}, idname string) error

DBFreeRequest is a free function that is needed to find the record with the specified value in the 'idname' column.

func DBGetList

func DBGetList(tblname string, name string, offset, limit int64, order string,
	where string, params ...interface{}) ([]interface{}, error)

DBGetList returns a list of column values with the specified 'offset', 'limit', 'where'

func DBGetTable

func DBGetTable(tblname string, columns string, offset, limit int64, order string,
	where string, params ...interface{}) ([]interface{}, error)

DBGetTable returns an array of values of the specified columns when there is selection of data 'offset', 'limit', 'where'

func DBInsert

func DBInsert(p *Parser, tblname string, params string, val ...interface{}) (ret int64, err error)

DBInsert inserts a record into the specified database table

func DBInsertReport

func DBInsertReport(p *Parser, tblname string, params string, val ...interface{}) (ret int64, err error)

DBInsertReport inserts a record into the specified report table

func DBInt

func DBInt(tblname string, name string, id int64) (int64, error)

DBInt returns the numeric value of the column for the record with the specified id

func DBIntExt

func DBIntExt(tblname string, name string, id interface{}, idname string) (ret int64, err error)

DBIntExt returns the numeric value of the 'name' column for the record with the specified value of the 'idname' field

func DBIntWhere

func DBIntWhere(tblname string, name string, where string, params ...interface{}) (ret int64, err error)

DBIntWhere returns the column value based on the 'where' condition and 'params' values for this condition

func DBString

func DBString(tblname string, name string, id int64) (string, error)

DBString returns the value of the field of the record with the specified id

func DBStringExt

func DBStringExt(tblname string, name string, id interface{}, idname string) (string, error)

DBStringExt returns the value of 'name' column for the record with the specified value of the 'idname' field

func DBStringWhere

func DBStringWhere(tblname string, name string, where string, params ...interface{}) (string, error)

DBStringWhere returns the column value based on the 'where' condition and 'params' values for this condition

func DBUpdate

func DBUpdate(p *Parser, tblname string, id int64, params string, val ...interface{}) (err error)

DBUpdate updates the item with the specified id in the table

func DBUpdateExt

func DBUpdateExt(p *Parser, tblname string, column string, value interface{}, params string, val ...interface{}) (err error)

DBUpdateExt updates the record in the specified table. You can specify 'where' query in params and then the values for this query

func Float

func Float(v interface{}) (ret float64)

Float converts the value to float64

func HexToBytes

func HexToBytes(hexdata string) ([]byte, error)

HexToBytes converts the hexadecimal representation to []byte

func IDToAddress

func IDToAddress(id int64) (out string)

IDToAddress converts the identifier of account to a string of the form XXXX -...- XXXX

func Int

func Int(val string) int64

Int converts a string to a number

func IsContract

func IsContract(p *Parser, names ...interface{}) bool

IsContract checks whether the name of the executable contract matches one of the names listed in the parameters.

func IsGovAccount

func IsGovAccount(p *Parser, citizen int64) bool

IsGovAccount checks whether the specified account is the owner of the state

func Len

func Len(in []interface{}) int64

Len returns the length of the slice

func Money

func Money(v interface{}) (ret decimal.Decimal)

Money converts the value into a numeric type for money

func NewStateFunc

func NewStateFunc(p *Parser, country, currency string) (err error)

NewStateFunc creates a new country

func PubToID

func PubToID(hexkey string) int64

PubToID returns a numeric identifier for the public key specified in the hexadecimal form.

func Sha256

func Sha256(text string) string

Sha256 returns SHA256 hash value

func StackCont

func StackCont(p interface{}, name string)

StackCont adds an element to the stack of contract call or removes the top element when name is empty

func StateTable

func StateTable(p *Parser, tblname string) string

StateTable adds a prefix with the state number to the table name

func StateTableTx

func StateTableTx(p *Parser, tblname string) string

StateTable adds a prefix with the state number to the table name

func StateVal

func StateVal(p *Parser, name string) string

StateVal returns the value of the specified parameter for the state

func Str

func Str(v interface{}) (ret string)

Str converts the value to a string

func UpdateContract

func UpdateContract(p *Parser, name, value, conditions string) error

UpdateContract updates the content and condition of contract with the specified name

func UpdateMenu

func UpdateMenu(p *Parser, name, value, conditions string) error

UpdateMenu updates the value and condition for the specified menu

func UpdatePage

func UpdatePage(p *Parser, name, value, menu, conditions string) error

UpdatePage updates the text, menu and condition of the specified page

func UpdateParam

func UpdateParam(p *Parser, name, value, conditions string) error

UpdateParam updates the value and condition of parameter with the specified name for the state

Types

type Parser

type Parser struct {
	*utils.DCDB
	TxMaps     *txMapsType
	TxMap      map[string][]byte
	TxMapS     map[string]string
	TxIds      int // count of transactions
	TxMapArr   []map[string][]byte
	TxMapsArr  []*txMapsType
	BlockData  *utils.BlockData
	PrevBlock  *utils.BlockData
	BinaryData []byte

	CurrentBlockID int64

	TxHash         string
	TxSlice        [][]byte
	MerkleRoot     []byte
	GoroutineName  string
	CurrentVersion string
	MrklRoot       []byte
	PublicKeys     [][]byte
	TxUserID       int64
	TxCitizenID    int64
	TxWalletID     int64
	TxStateID      uint32
	TxStateIDStr   string
	TxTime         int64
	TxCost         int64           // Maximum cost of executing contract
	TxUsedCost     decimal.Decimal // Used cost of CPU resources

	//	newPublicKeysHex [3][]byte
	TxPtr      interface{} // Pointer to the corresponding struct in consts/struct.go
	TxData     map[string]interface{}
	TxContract *smart.Contract
	TxVars     map[string]string
	AllPkeys   map[string]string
	States     map[int64]string
	// contains filtered or unexported fields
}

Parser is a structure for parsing transactions

func (*Parser) AccessChange

func (p *Parser) AccessChange(table, name string) error

AccessChange checks rights of changing the table

func (*Parser) AccessColumns

func (p *Parser) AccessColumns(table string, columns []string) error

AccessColumns checks access rights to the columns

func (*Parser) AccessRights

func (p *Parser) AccessRights(condition string, iscondition bool) error

AccessRights checks the access right by executing the condition value

func (*Parser) AccessTable

func (p *Parser) AccessTable(table, action string) error

AccessTable checks the access right to the table

func (*Parser) ActivateContract

func (p *Parser) ActivateContract() error

ActivateContract is a main function of ActivateContract transaction

func (*Parser) ActivateContractFront

func (p *Parser) ActivateContractFront() error

ActivateContractFront checks conditions of ActivateContract transaction

func (*Parser) ActivateContractInit

func (p *Parser) ActivateContractInit() error

ActivateContractInit initialize ActivateContract transaction

func (*Parser) ActivateContractRollback

func (p *Parser) ActivateContractRollback() error

ActivateContractRollback rollbacks ActivateContract transaction

func (*Parser) AllTxParser

func (p *Parser) AllTxParser() error

AllTxParser parses new transactions

func (*Parser) AppendMenu

func (p *Parser) AppendMenu() error

AppendMenu proceeds AppendMenu transaction

func (*Parser) AppendMenuFront

func (p *Parser) AppendMenuFront() error

AppendMenuFront checks conditions of AppendMenu transaction

func (*Parser) AppendMenuInit

func (p *Parser) AppendMenuInit() error

AppendMenuInit initializes AppendMenu transaction

func (*Parser) AppendMenuRollback

func (p *Parser) AppendMenuRollback() error

AppendMenuRollback rollbacks AppendMenu transaction

func (*Parser) AppendPage

func (p *Parser) AppendPage() error

AppendPage proceeds AppendPage transaction

func (*Parser) AppendPageFront

func (p *Parser) AppendPageFront() error

AppendPageFront checks conditions of AppendPage transaction

func (*Parser) AppendPageInit

func (p *Parser) AppendPageInit() error

AppendPageInit initialize AppendPage transaction

func (*Parser) AppendPageRollback

func (p *Parser) AppendPageRollback() error

AppendPageRollback rollbacks AppendPage transaction

func (*Parser) BlockError

func (p *Parser) BlockError(err error)

BlockError writes the error of the transaction in the transactions_status table

func (*Parser) CallContract

func (p *Parser) CallContract(flags int) (err error)

CallContract calls the contract functions according to the specified flags

func (*Parser) ChangeNodeKey

func (p *Parser) ChangeNodeKey() error

ChangeNodeKey proceeds ChangeNodeKey transaction

func (*Parser) ChangeNodeKeyDLT

func (p *Parser) ChangeNodeKeyDLT() error

ChangeNodeKeyDLT proceeds ChangeNodeKeyDLT transaction

func (*Parser) ChangeNodeKeyDLTFront

func (p *Parser) ChangeNodeKeyDLTFront() error

ChangeNodeKeyDLTFront check conditions of ChangeNodeKeyDLT transaction

func (*Parser) ChangeNodeKeyDLTInit

func (p *Parser) ChangeNodeKeyDLTInit() error

ChangeNodeKeyDLTInit initializes ChangeNodeKeyDLT transaction

func (*Parser) ChangeNodeKeyDLTRollback

func (p *Parser) ChangeNodeKeyDLTRollback() error

ChangeNodeKeyDLTRollback rollbacks ChangeNodeKeyDLT transaction

func (*Parser) ChangeNodeKeyFront

func (p *Parser) ChangeNodeKeyFront() error

ChangeNodeKeyFront checks conditions of ChangeNodeKey transaction

func (*Parser) ChangeNodeKeyInit

func (p *Parser) ChangeNodeKeyInit() error

ChangeNodeKeyInit initializes ChangeNodeKey transaction

func (*Parser) ChangeNodeKeyRollback

func (p *Parser) ChangeNodeKeyRollback() error

ChangeNodeKeyRollback rollbacks ChangeNodeKey transaction

func (*Parser) CheckBlockHeader

func (p *Parser) CheckBlockHeader() error

CheckBlockHeader checks the block header

func (*Parser) CheckInputData

func (p *Parser) CheckInputData(data map[string]string) error

CheckInputData checks the each item of data

func (*Parser) CheckLogTx

func (p *Parser) CheckLogTx(txBinary []byte, transactions, txQueue bool) error

CheckLogTx checks if this transaction exists This is protection against dos, when one transaction could be sent a million times and it would have successfully passed a frontal test

func (*Parser) CheckTableExists

func (p *Parser) CheckTableExists(table string) (bool, error)

CheckTableExists checks if the table exists

func (*Parser) DLTChangeHostVote

func (p *Parser) DLTChangeHostVote() error

DLTChangeHostVote proceeds DLTChangeHostVote transaction

func (*Parser) DLTChangeHostVoteFront

func (p *Parser) DLTChangeHostVoteFront() error

DLTChangeHostVoteFront checks conditions of DLTChangeHostVote transaction

func (*Parser) DLTChangeHostVoteInit

func (p *Parser) DLTChangeHostVoteInit() error

DLTChangeHostVoteInit initializes DLTChangeHostVote transaction

func (*Parser) DLTChangeHostVoteRollback

func (p *Parser) DLTChangeHostVoteRollback() error

DLTChangeHostVoteRollback rollbacks DLTChangeHostVote transaction

func (*Parser) DLTTransfer

func (p *Parser) DLTTransfer() error

DLTTransfer proceeds DLTTransfer transaction

func (*Parser) DLTTransferFront

func (p *Parser) DLTTransferFront() error

DLTTransferFront checks conditions DLTTransfer transaction

func (*Parser) DLTTransferInit

func (p *Parser) DLTTransferInit() error

DLTTransferInit initializes DLTTransfer transaction

func (*Parser) DLTTransferRollback

func (p *Parser) DLTTransferRollback() error

DLTTransferRollback rollbacks DLTTransfer transaction

func (*Parser) DeleteQueueTx

func (p *Parser) DeleteQueueTx(hashHex []byte) error

DeleteQueueTx deletes a transaction from the queue

func (*Parser) EditColumn

func (p *Parser) EditColumn() error

EditColumn proceeds EditColumn transaction

func (*Parser) EditColumnFront

func (p *Parser) EditColumnFront() error

EditColumnFront checks conditions of EditColumn transaction

func (*Parser) EditColumnInit

func (p *Parser) EditColumnInit() error

EditColumnInit initializes EditColumn transaction

func (*Parser) EditColumnRollback

func (p *Parser) EditColumnRollback() error

EditColumnRollback rollbacks EditColumn transaction

func (*Parser) EditContract

func (p *Parser) EditContract() error

EditContract proceeds EditContract transaction

func (*Parser) EditContractFront

func (p *Parser) EditContractFront() error

EditContractFront checks conditions of EditContract transaction

func (*Parser) EditContractInit

func (p *Parser) EditContractInit() error

EditContractInit initializes EditContract transaction

func (*Parser) EditContractRollback

func (p *Parser) EditContractRollback() error

EditContractRollback rollbacks EditContract transaction

func (*Parser) EditLang

func (p *Parser) EditLang() error

EditLang proceeds EditLang transaction

func (*Parser) EditLangFront

func (p *Parser) EditLangFront() error

EditLangFront checks conditions of EditLang transaction

func (*Parser) EditLangInit

func (p *Parser) EditLangInit() error

EditLangInit initializes EditLang transaction

func (*Parser) EditLangRollback

func (p *Parser) EditLangRollback() error

EditLangRollback rollbacks EditLang transaction

func (*Parser) EditMenu

func (p *Parser) EditMenu() error

EditMenu proceeds EditMenu transaction

func (*Parser) EditMenuFront

func (p *Parser) EditMenuFront() error

EditMenuFront checks conditions of EditMenu transaction

func (*Parser) EditMenuInit

func (p *Parser) EditMenuInit() error

EditMenuInit initializes EditMenu transaction

func (*Parser) EditMenuRollback

func (p *Parser) EditMenuRollback() error

EditMenuRollback rollbacks EditMenu transaction

func (*Parser) EditPage

func (p *Parser) EditPage() error

EditPage proceeds EditPage transaction

func (*Parser) EditPageFront

func (p *Parser) EditPageFront() error

EditPageFront checks conditions of EditPage transaction

func (*Parser) EditPageInit

func (p *Parser) EditPageInit() error

EditPageInit initializes EditPage transaction

func (*Parser) EditPageRollback

func (p *Parser) EditPageRollback() error

EditPageRollback rollbacks EditPage transaction

func (*Parser) EditSign

func (p *Parser) EditSign() error

EditSign proceeds EditSign transaction

func (*Parser) EditSignFront

func (p *Parser) EditSignFront() error

EditSignFront checks conditions of EditSign transaction

func (*Parser) EditSignInit

func (p *Parser) EditSignInit() error

EditSignInit initializes EditSign transaction

func (*Parser) EditSignRollback

func (p *Parser) EditSignRollback() error

EditSignRollback rollbacks EditSign transaction

func (*Parser) EditStateParameters

func (p *Parser) EditStateParameters() error

EditStateParameters proceeds EditStateParameters transaction

func (*Parser) EditStateParametersFront

func (p *Parser) EditStateParametersFront() error

EditStateParametersFront checks conditions of EditStateParameters transaction

func (*Parser) EditStateParametersInit

func (p *Parser) EditStateParametersInit() error

EditStateParametersInit initializes EditStateParameters transaction

func (*Parser) EditStateParametersRollback

func (p *Parser) EditStateParametersRollback() error

EditStateParametersRollback rollbacks EditStateParameters transaction

func (*Parser) EditTable

func (p *Parser) EditTable() error

EditTable proceeds EditTable transaction

func (*Parser) EditTableFront

func (p *Parser) EditTableFront() error

EditTableFront checks conditions of EditTable transaction

func (*Parser) EditTableInit

func (p *Parser) EditTableInit() error

EditTableInit initializes EditTable transaction

func (*Parser) EditTableRollback

func (p *Parser) EditTableRollback() error

EditTableRollback rollbacks EditTable transaction

func (*Parser) EditWallet

func (p *Parser) EditWallet() error

EditWallet proceeds EditWallet transaction

func (*Parser) EditWalletFront

func (p *Parser) EditWalletFront() error

EditWalletFront checks conditions of EditWallet transaction

func (*Parser) EditWalletInit

func (p *Parser) EditWalletInit() error

EditWalletInit initializes EditWallet transaction

func (*Parser) EditWalletRollback

func (p *Parser) EditWalletRollback() error

EditWalletRollback rollbacks EditWallet transaction

func (*Parser) ErrInfo

func (p *Parser) ErrInfo(verr interface{}) error

ErrInfo returns the more detailed error

func (*Parser) EvalIf

func (p *Parser) EvalIf(conditions string) (bool, error)

EvalIf counts and returns the logical value of the specified expression

func (*Parser) FirstBlock

func (p *Parser) FirstBlock() error

FirstBlock proceeds FirstBlock transaction

func (*Parser) FirstBlockFront

func (p *Parser) FirstBlockFront() error

FirstBlockFront checks conditions of FirstBlock transaction

func (*Parser) FirstBlockInit

func (p *Parser) FirstBlockInit() error

FirstBlockInit initializes FirstBlock transaction

func (*Parser) FirstBlockRollback

func (p *Parser) FirstBlockRollback() error

FirstBlockRollback rollbacks FirstBlock transaction

func (*Parser) FormatBlockData

func (p *Parser) FormatBlockData() string

FormatBlockData returns formated block data

func (*Parser) FormatTxMap

func (p *Parser) FormatTxMap() string

FormatTxMap returns the formated TxMap

func (*Parser) GetBlockInfo

func (p *Parser) GetBlockInfo() *utils.BlockData

GetBlockInfo returns BlockData structure

func (*Parser) GetBlocks

func (p *Parser) GetBlocks(blockID int64, host string, rollbackBlocks, goroutineName string, dataTypeBlockBody int64) error

GetBlocks gets blocks

func (*Parser) GetContractLimit

func (p *Parser) GetContractLimit() (ret int64)

GetContractLimit returns the default maximal cost of contract

func (*Parser) GetInfoBlock

func (p *Parser) GetInfoBlock() error

GetInfoBlock returns the latest block

func (*Parser) GetOldBlocks

func (p *Parser) GetOldBlocks(walletID, StateID, blockID int64, host string, goroutineName string, dataTypeBlockBody int64) error

GetOldBlocks gets previous blocks

func (*Parser) GetTxMaps

func (p *Parser) GetTxMaps(fields []map[string]string) error

GetTxMaps initializes TxMap and TxMaps structures

func (*Parser) InsertIntoBlockchain

func (p *Parser) InsertIntoBlockchain() error

InsertIntoBlockchain inserts a block into the blockchain

func (*Parser) NewAccount

func (p *Parser) NewAccount() error

NewAccount proceeds NewAccount transaction

func (*Parser) NewAccountFront

func (p *Parser) NewAccountFront() error

NewAccountFront checks conditions of NewAccount transaction

func (*Parser) NewAccountInit

func (p *Parser) NewAccountInit() error

NewAccountInit initializes NewAccount transaction

func (*Parser) NewAccountRollback

func (p *Parser) NewAccountRollback() error

NewAccountRollback rollbacks NewAccount transaction

func (*Parser) NewColumn

func (p *Parser) NewColumn() error

NewColumn proceeds NewColumn transaction

func (*Parser) NewColumnFront

func (p *Parser) NewColumnFront() error

NewColumnFront checks conditions of NewColumn transaction

func (*Parser) NewColumnInit

func (p *Parser) NewColumnInit() error

NewColumnInit initializes NewColumn transaction

func (*Parser) NewColumnRollback

func (p *Parser) NewColumnRollback() error

NewColumnRollback rollbacks NewColumn transaction

func (*Parser) NewContract

func (p *Parser) NewContract() error

NewContract proceeds NewContract transaction

func (*Parser) NewContractFront

func (p *Parser) NewContractFront() error

NewContractFront checks conditions of NewContract transaction

func (*Parser) NewContractInit

func (p *Parser) NewContractInit() error

NewContractInit initializes NewContract transaction

func (*Parser) NewContractRollback

func (p *Parser) NewContractRollback() error

NewContractRollback rollbacks NewContract transaction

func (*Parser) NewLang

func (p *Parser) NewLang() error

NewLang proceeds NewLang transaction

func (*Parser) NewLangFront

func (p *Parser) NewLangFront() error

NewLangFront checks conditions of NewLang transaction

func (*Parser) NewLangInit

func (p *Parser) NewLangInit() error

NewLangInit initializes NewLang transaction

func (*Parser) NewLangRollback

func (p *Parser) NewLangRollback() error

NewLangRollback rollbacks NewLang transaction

func (*Parser) NewMenu

func (p *Parser) NewMenu() error

NewMenu proceeds NewMenu transaction

func (*Parser) NewMenuFront

func (p *Parser) NewMenuFront() error

NewMenuFront checks conditions of NewMenu transaction

func (*Parser) NewMenuInit

func (p *Parser) NewMenuInit() error

NewMenuInit initializes NewMenu transaction

func (*Parser) NewMenuRollback

func (p *Parser) NewMenuRollback() error

NewMenuRollback rollbacks NewMenu transaction

func (*Parser) NewPage

func (p *Parser) NewPage() error

NewPage proceeds NewPage transaction

func (*Parser) NewPageFront

func (p *Parser) NewPageFront() error

NewPageFront checks conditions of NewPage transaction

func (*Parser) NewPageInit

func (p *Parser) NewPageInit() error

NewPageInit initializes NewPage transaction

func (*Parser) NewPageRollback

func (p *Parser) NewPageRollback() error

NewPageRollback rollbacks NewPage transaction

func (*Parser) NewSign

func (p *Parser) NewSign() error

NewSign proceeds NewSign transaction

func (*Parser) NewSignFront

func (p *Parser) NewSignFront() error

NewSignFront checks conditions of NewSign transaction

func (*Parser) NewSignInit

func (p *Parser) NewSignInit() error

NewSignInit initializes NewSign transaction

func (*Parser) NewSignRollback

func (p *Parser) NewSignRollback() error

NewSignRollback rollbacks NewSign transaction

func (*Parser) NewState

func (p *Parser) NewState() error

NewState proceeds NewState transaction

func (*Parser) NewStateFront

func (p *Parser) NewStateFront() error

NewStateFront checks conditions of NewState transaction

func (*Parser) NewStateGlobal

func (p *Parser) NewStateGlobal(country, currency string) error

NewStateGlobal checks if the state or the currency exists

func (*Parser) NewStateInit

func (p *Parser) NewStateInit() error

NewStateInit initializes NewState transaction

func (*Parser) NewStateMain

func (p *Parser) NewStateMain(country, currency string) (id string, err error)

NewStateMain creates state tables in the database

func (*Parser) NewStateParameters

func (p *Parser) NewStateParameters() error

NewStateParameters proceeds NewStateParameters transaction

func (*Parser) NewStateParametersFront

func (p *Parser) NewStateParametersFront() error

NewStateParametersFront checks conditions of NewStateParameters transaction

func (*Parser) NewStateParametersInit

func (p *Parser) NewStateParametersInit() error

NewStateParametersInit initializes NewStateParameters transaction

func (*Parser) NewStateParametersRollback

func (p *Parser) NewStateParametersRollback() error

NewStateParametersRollback rollbacks NewStateParameters transaction

func (*Parser) NewStateRollback

func (p *Parser) NewStateRollback() error

NewStateRollback rollbacks NewState transaction

func (*Parser) NewTable

func (p *Parser) NewTable() error

NewTable proceeds NewTable transaction

func (*Parser) NewTableFront

func (p *Parser) NewTableFront() error

NewTableFront checks conditions of NewTable transaction

func (*Parser) NewTableInit

func (p *Parser) NewTableInit() error

NewTableInit initializes NewTable transaction

func (*Parser) NewTableRollback

func (p *Parser) NewTableRollback() error

NewTableRollback rollbacks NewTable transaction

func (*Parser) ParseBlock

func (p *Parser) ParseBlock() error

ParseBlock starts to parse a block

func (*Parser) ParseDataFull

func (p *Parser) ParseDataFull(blockGenerator bool) error

ParseDataFull checks the condiitions and proceeds of transactions Frontal check + adding the data from the block to a table and info_block

func (*Parser) ParseDataGate

func (p *Parser) ParseDataGate(onlyTx bool) error

ParseDataGate checks conditions of transactions from the gate

func (*Parser) ParseDataRollback

func (p *Parser) ParseDataRollback() error

ParseDataRollback rollbacks blocks

func (*Parser) ParseInit

func (p *Parser) ParseInit() error

ParseInit is reserved

func (*Parser) ParseTransaction

func (p *Parser) ParseTransaction(transactionBinaryData *[]byte) ([][]byte, error)

ParseTransaction parses a transaction

func (*Parser) RestoreAccess

func (p *Parser) RestoreAccess() error

RestoreAccess proceeds RestoreAccess transaction

func (*Parser) RestoreAccessActive

func (p *Parser) RestoreAccessActive() error

RestoreAccessActive proceeds RestoreAccessActive transaction

func (*Parser) RestoreAccessActiveFront

func (p *Parser) RestoreAccessActiveFront() error

RestoreAccessActiveFront checks conditions of RestoreAccessActive transaction

func (*Parser) RestoreAccessActiveInit

func (p *Parser) RestoreAccessActiveInit() error

RestoreAccessActiveInit initializes RestoreAccessActive transaction

func (*Parser) RestoreAccessActiveRollback

func (p *Parser) RestoreAccessActiveRollback() error

RestoreAccessActiveRollback rollbacks RestoreAccessActive transaction

func (*Parser) RestoreAccessClose

func (p *Parser) RestoreAccessClose() error

RestoreAccessClose proceeds RestoreAccessClose transaction

func (*Parser) RestoreAccessCloseFront

func (p *Parser) RestoreAccessCloseFront() error

RestoreAccessCloseFront checks conditions of RestoreAccessClose transaction

func (*Parser) RestoreAccessCloseInit

func (p *Parser) RestoreAccessCloseInit() error

RestoreAccessCloseInit initializes RestoreAccessClose transaction

func (*Parser) RestoreAccessCloseRollback

func (p *Parser) RestoreAccessCloseRollback() error

RestoreAccessCloseRollback rollbacks RestoreAccessClose transaction

func (*Parser) RestoreAccessFront

func (p *Parser) RestoreAccessFront() error

RestoreAccessFront checks conditions of RestoreAccess transaction

func (*Parser) RestoreAccessInit

func (p *Parser) RestoreAccessInit() error

RestoreAccessInit initializes RestoreAccess transaction

func (*Parser) RestoreAccessRequest

func (p *Parser) RestoreAccessRequest() error

RestoreAccessRequest proceeds RestoreAccessRequest transaction

func (*Parser) RestoreAccessRequestFront

func (p *Parser) RestoreAccessRequestFront() error

RestoreAccessRequestFront checks conditions of RestoreAccessRequest transaction

func (*Parser) RestoreAccessRequestInit

func (p *Parser) RestoreAccessRequestInit() error

RestoreAccessRequestInit initializes RestoreAccessRequest transaction

func (*Parser) RestoreAccessRequestRollback

func (p *Parser) RestoreAccessRequestRollback() error

RestoreAccessRequestRollback rollbacks RestoreAccessRequest transaction

func (*Parser) RestoreAccessRollback

func (p *Parser) RestoreAccessRollback() error

RestoreAccessRollback rollbacks RestoreAccess transaction

func (*Parser) RollbackTo

func (p *Parser) RollbackTo(binaryData []byte, skipCurrent bool) error

RollbackTo rollbacks proceeded transactions If the error appears during the checking of transactions, call the rollback of all transactions

func (*Parser) RollbackToBlockID

func (p *Parser) RollbackToBlockID(blockID int64) error

RollbackToBlockID rollbacks blocks till blockID

func (*Parser) RollbackTransactions

func (p *Parser) RollbackTransactions() error

RollbackTransactions is reserved

func (*Parser) TxParser

func (p *Parser) TxParser(hash, binaryTx []byte, myTx bool) error

TxParser writes transactions into the queue

func (*Parser) UpdBlockInfo

func (p *Parser) UpdBlockInfo()

UpdBlockInfo updates info_block table

func (*Parser) UpdFullNodes

func (p *Parser) UpdFullNodes() error

UpdFullNodes proceeds UpdFullNodes transaction

func (*Parser) UpdFullNodesFront

func (p *Parser) UpdFullNodesFront() error

UpdFullNodesFront checks conditions of UpdFullNodes transaction

func (*Parser) UpdFullNodesInit

func (p *Parser) UpdFullNodesInit() error

UpdFullNodesInit initializes UpdFullNodes transaction

func (*Parser) UpdFullNodesRollback

func (p *Parser) UpdFullNodesRollback() error

UpdFullNodesRollback rollbacks UpdFullNodes transaction

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL