Versions in this module Expand all Collapse all v1 v1.0.3 Apr 3, 2019 Changes in this version + const BloomBitLength + const BloomByteLength + const ReceiptStatusFailed + const ReceiptStatusSuccessful + var Bloom9 = bloom9 + var EmptyRootHash = DeriveSha(Transactions{}) + var EmptyUncleHash = CalcUncleHash(nil) + var ErrInvalidChainId = errors.New("invalid chain id for signer") + var ErrInvalidSig = errors.New("invalid transaction v, r, s values") + func BloomLookup(bin Bloom, topic bytesBacked) bool + func CalcUncleHash(uncles []*Header) common.Hash + func DeriveSha(list DerivableList) common.Hash + func GenOptionTxHash(addr common.Address, nonce uint64) common.Hash + func LogsBloom(logs []*Log) *big.Int + func Number(b1, b2 *Block) bool + func Sender(signer Signer, tx *Transaction) (common.Address, error) + type AccountName [common.HashLength]byte + func (name *AccountName) Bytes() []byte + func (name *AccountName) CalPrice() int64 + func (name *AccountName) GetBigPrice() *big.Int + func (name *AccountName) IsValid() bool + func (name *AccountName) SetBytes(b []byte) + func (name *AccountName) SetHash(hash common.Hash) + func (name *AccountName) SetString(nameStr string) error + func (name *AccountName) String() string + func (name *AccountName) ToHash() (hash common.Hash) + type BindingTable struct + MainAccounts map[common.Address][]common.Address + SubAccounts map[common.Address]common.Address + func (bindingTable *BindingTable) DelMainAccount(mainAccount common.Address) []common.Address + func (bindingTable *BindingTable) DelSubAccount(subAccount common.Address) + func (bindingTable *BindingTable) GetSubAccountSizeInMainAccount(mainAccount common.Address) int + func (bindingTable *BindingTable) IsAccountInBinding(account common.Address) bool + func (bindingTable *BindingTable) IsMainAccountExist(mainAccount common.Address) bool + func (bindingTable *BindingTable) IsSubAccountExist(subAccount common.Address) bool + func (bindingTable *BindingTable) UpdateBinding(mainAccount, subAccount common.Address) + type Block struct + ReceivedAt time.Time + ReceivedFrom interface{} + func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []*Receipt) *Block + func NewBlockWithHeader(header *Header) *Block + func (b *Block) Bloom() Bloom + func (b *Block) Body() *Body + func (b *Block) Coinbase() common.Address + func (b *Block) DecodeRLP(s *rlp.Stream) error + func (b *Block) DeprecatedTd() *big.Int + func (b *Block) Difficulty() *big.Int + func (b *Block) EncodeRLP(w io.Writer) error + func (b *Block) Extra() []byte + func (b *Block) GasLimit() uint64 + func (b *Block) GasUsed() uint64 + func (b *Block) Hash() common.Hash + func (b *Block) HashNoNonce() common.Hash + func (b *Block) Header() *Header + func (b *Block) MixDigest() common.Hash + func (b *Block) Nonce() uint64 + func (b *Block) Number() *big.Int + func (b *Block) NumberU64() uint64 + func (b *Block) ParentHash() common.Hash + func (b *Block) ReceiptHash() common.Hash + func (b *Block) Root() common.Hash + func (b *Block) Size() common.StorageSize + func (b *Block) String() string + func (b *Block) Time() *big.Int + func (b *Block) Transaction(hash common.Hash) *Transaction + func (b *Block) Transactions() Transactions + func (b *Block) TxHash() common.Hash + func (b *Block) UncleHash() common.Hash + func (b *Block) Uncles() []*Header + func (b *Block) WithBody(transactions []*Transaction, uncles []*Header) *Block + func (b *Block) WithSeal(header *Header) *Block + type BlockBy func(b1, b2 *Block) bool + func (self BlockBy) Sort(blocks Blocks) + type BlockNonce [8]byte + func EncodeNonce(i uint64) BlockNonce + func (n *BlockNonce) UnmarshalText(input []byte) error + func (n BlockNonce) MarshalText() ([]byte, error) + func (n BlockNonce) Uint64() uint64 + type Blocks []*Block + type Bloom [BloomByteLength]byte + func BytesToBloom(b []byte) Bloom + func CreateBloom(receipts Receipts) Bloom + func (b *Bloom) Add(d *big.Int) + func (b *Bloom) SetBytes(d []byte) + func (b *Bloom) UnmarshalText(input []byte) error + func (b Bloom) Big() *big.Int + func (b Bloom) Bytes() []byte + func (b Bloom) MarshalText() ([]byte, error) + func (b Bloom) Test(test *big.Int) bool + func (b Bloom) TestBytes(test []byte) bool + type Body struct + Transactions []*Transaction + Uncles []*Header + type BucketPropertie struct + Backup uint64 + BucketId string + Size uint64 + TimeEnd uint64 + TimeStart uint64 + type DerivableList interface + GetRlp func(i int) []byte + Len func() int + type EIP155Signer struct + func NewEIP155Signer(chainId *big.Int) EIP155Signer + func (s EIP155Signer) Equal(s2 Signer) bool + func (s EIP155Signer) Hash(tx *Transaction) common.Hash + func (s EIP155Signer) Sender(tx *Transaction) (common.Address, error) + func (s EIP155Signer) SignatureValues(tx *Transaction, sig []byte) (R, S, V *big.Int, err error) + type FileIDArr struct + AuthorityTable map[common.Address]int + CreateTime int64 + Dataversion string + EndTime int64 + FileID string + FromAccount common.Address + LogSwitch bool + MortgagTotal *big.Int + MortgageTable map[common.Address]*hexutil.Big + Sidechain Sidechain + SidechainStatus map[string]map[common.Address]*hexutil.Big + Terminate bool + TimeLimit *hexutil.Big + type ForbidBackStakeList []common.Address + func (forbidList *ForbidBackStakeList) Add(addr common.Address) + func (forbidList *ForbidBackStakeList) Del(addr common.Address) + func (forbidList *ForbidBackStakeList) IsExist(addr common.Address) bool + type FrontierSigner struct + func (fs FrontierSigner) Hash(tx *Transaction) common.Hash + func (fs FrontierSigner) Sender(tx *Transaction) (common.Address, error) + func (fs FrontierSigner) SignatureValues(tx *Transaction, sig []byte) (r, s, v *big.Int, err error) + func (s FrontierSigner) Equal(s2 Signer) bool + type GenaroData struct + Buckets []*BucketPropertie + FileSharePublicKey string + Heft uint64 + HeftLog NumLogs + Node []string + PromissoryNotes PromissoryNotes + SpecialTxTypeMortgageInit SpecialTxTypeMortgageInit + SpecialTxTypeMortgageInitArr map[string]SpecialTxTypeMortgageInit + Stake uint64 + StakeLog NumLogs + SynchronizeShareKey SynchronizeShareKey + SynchronizeShareKeyArr map[string]SynchronizeShareKey + Traffic uint64 + type GenaroPrice struct + BackStackListMax uint64 + BindingAccount string + BucketApplyGasPerGPerDay *hexutil.Big + CoinRewardsRatio uint64 + CommitteeMinStake uint64 + ExtraPrice []byte + HeftAccount string + MaxBinding uint64 + MinStake uint64 + OneDayMortgageGes *hexutil.Big + OneDaySyncLogGsaCost *hexutil.Big + RatioPerYear uint64 + StakeValuePerNode *hexutil.Big + StorageRewardsRatio uint64 + SynStateAccount string + TrafficApplyGasPerG *hexutil.Big + type Header struct + Bloom Bloom + Coinbase common.Address + Difficulty *big.Int + Extra []byte + GasLimit uint64 + GasUsed uint64 + MixDigest common.Hash + Nonce BlockNonce + Number *big.Int + ParentHash common.Hash + ReceiptHash common.Hash + Root common.Hash + Time *big.Int + TxHash common.Hash + UncleHash common.Hash + func CopyHeader(h *Header) *Header + func (h *Header) Hash() common.Hash + func (h *Header) HashNoNonce() common.Hash + func (h *Header) Size() common.StorageSize + func (h *Header) String() string + func (h *Header) UnmarshalJSON(input []byte) error + func (h Header) MarshalJSON() ([]byte, error) + type HomesteadSigner struct + func (hs HomesteadSigner) Sender(tx *Transaction) (common.Address, error) + func (hs HomesteadSigner) SignatureValues(tx *Transaction, sig []byte) (r, s, v *big.Int, err error) + func (s HomesteadSigner) Equal(s2 Signer) bool + type LastSynState struct + LastRootStates map[common.Hash]uint64 + LastSynBlockHash common.Hash + LastSynBlockNum uint64 + func (lastSynState *LastSynState) AddLastSynState(blockhash common.Hash, blockNumber uint64) + type Log struct + Address common.Address + BlockHash common.Hash + BlockNumber uint64 + Data []byte + Index uint + Removed bool + Topics []common.Hash + TxHash common.Hash + TxIndex uint + func (l *Log) DecodeRLP(s *rlp.Stream) error + func (l *Log) EncodeRLP(w io.Writer) error + func (l *Log) String() string + func (l *Log) UnmarshalJSON(input []byte) error + func (l Log) MarshalJSON() ([]byte, error) + type LogForStorage Log + func (l *LogForStorage) DecodeRLP(s *rlp.Stream) error + func (l *LogForStorage) EncodeRLP(w io.Writer) error + type Message struct + func NewMessage(from common.Address, to *common.Address, nonce uint64, amount *big.Int, ...) Message + func (m Message) CheckNonce() bool + func (m Message) Data() []byte + func (m Message) From() common.Address + func (m Message) Gas() uint64 + func (m Message) GasPrice() *big.Int + func (m Message) Nonce() uint64 + func (m Message) To() *common.Address + func (m Message) Value() *big.Int + type NumLog struct + BlockNum uint64 + Num uint64 + type NumLogs []NumLog + func (logs *NumLogs) Add(log NumLog) + func (logs *NumLogs) Del(blockNumBefor uint64) + func (logs NumLogs) GetFirst() NumLog + func (logs NumLogs) GetFirstAfterBlockNum(blockNum uint64, startId, endId uint64) (*NumLog, uint64) + func (logs NumLogs) GetLast() NumLog + func (logs NumLogs) GetLastBeforBlockNum(blockNum uint64, startId, endId uint64) (*NumLog, uint64) + func (logs NumLogs) GetLastDiff() (diff, blockNum uint64) + func (logs NumLogs) GetRangeDiff(blockNumStart uint64, blockNumEnd uint64) uint64 + type OptionTxTable map[common.Hash]PromissoryNotesOptionTx + type PromissoryNote struct + Num uint64 + RestoreBlock uint64 + type PromissoryNotes []PromissoryNote + func (notes *PromissoryNotes) Add(newNote PromissoryNote) + func (notes *PromissoryNotes) Del(newNote PromissoryNote) bool + func (notes *PromissoryNotes) DelBefor(blockNum uint64) uint64 + func (notes *PromissoryNotes) GetAllNum() uint64 + func (notes *PromissoryNotes) GetBefor(blockNum uint64) uint64 + func (notes *PromissoryNotes) GetNum(restoreBlock uint64) uint64 + type PromissoryNotesOptionTx struct + IsSell bool + OptionOwner common.Address + OptionPrice *big.Int + PromissoryNoteTxPrice *big.Int + PromissoryNotesOwner common.Address + RestoreBlock uint64 + TxNum uint64 + type Receipt struct + Bloom Bloom + ContractAddress common.Address + CumulativeGasUsed uint64 + ExtraInfo string + GasUsed uint64 + Logs []*Log + PostState []byte + Status uint + TxHash common.Hash + func NewReceipt(root []byte, failed bool, cumulativeGasUsed uint64) *Receipt + func (r *Receipt) DecodeRLP(s *rlp.Stream) error + func (r *Receipt) EncodeRLP(w io.Writer) error + func (r *Receipt) Size() common.StorageSize + func (r *Receipt) String() string + func (r *Receipt) UnmarshalJSON(input []byte) error + func (r Receipt) MarshalJSON() ([]byte, error) + type ReceiptForStorage Receipt + func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error + func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error + type Receipts []*Receipt + func (r Receipts) GetRlp(i int) []byte + func (r Receipts) Len() int + type RewardsValues struct + CoinActualRewards *big.Int + PreCoinActualRewards *big.Int + PreStorageActualRewards *big.Int + PreSurplusCoin *big.Int + StorageActualRewards *big.Int + SurplusCoin *big.Int + TotalActualRewards *big.Int + type Sidechain map[common.Address]*hexutil.Big + type Signer interface + Equal func(Signer) bool + Hash func(tx *Transaction) common.Hash + Sender func(tx *Transaction) (common.Address, error) + SignatureValues func(tx *Transaction, sig []byte) (r, s, v *big.Int, err error) + func MakeSigner(config *params.ChainConfig, blockNumber *big.Int) Signer + type SpecialTxInput struct + AddCoin *hexutil.Big + Address string + BlockNumber string + BucketID string + Duration uint64 + IsSell bool + Message string + NodeID string + OptionPrice *hexutil.Big + OrderId common.Hash + PromissoryNoteTxPrice *hexutil.Big + RestoreBlock uint64 + Sign string + Size uint64 + TxNum uint64 + Type *hexutil.Big + func (s SpecialTxInput) SpecialCost(currentPrice *GenaroPrice, bucketsMap map[string]interface{}) big.Int + type SpecialTxTypeMortgageInit FileIDArr + type StorageBlock Block + func (b *StorageBlock) DecodeRLP(s *rlp.Stream) error + type SynchronizeShareKey struct + FromAccount common.Address + MailHash string + MailSize int + RecipientAddress common.Address + ShareKey string + ShareKeyId string + Shareprice *hexutil.Big + Status int + type Transaction struct + func NewContractCreation(nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) *Transaction + func NewTransaction(nonce uint64, to common.Address, amount *big.Int, gasLimit uint64, ...) *Transaction + func SignTx(tx *Transaction, s Signer, prv *ecdsa.PrivateKey) (*Transaction, error) + func (tx *Transaction) AsMessage(s Signer) (Message, error) + func (tx *Transaction) ChainId() *big.Int + func (tx *Transaction) CheckNonce() bool + func (tx *Transaction) Cost() *big.Int + func (tx *Transaction) Data() []byte + func (tx *Transaction) DecodeRLP(s *rlp.Stream) error + func (tx *Transaction) EncodeRLP(w io.Writer) error + func (tx *Transaction) Gas() uint64 + func (tx *Transaction) GasPrice() *big.Int + func (tx *Transaction) Hash() common.Hash + func (tx *Transaction) MarshalJSON() ([]byte, error) + func (tx *Transaction) Nonce() uint64 + func (tx *Transaction) Protected() bool + func (tx *Transaction) RawSignatureValues() (*big.Int, *big.Int, *big.Int) + func (tx *Transaction) Size() common.StorageSize + func (tx *Transaction) SpecialCost(currentPrice *GenaroPrice, bucketsMap map[string]interface{}) *big.Int + func (tx *Transaction) String() string + func (tx *Transaction) To() *common.Address + func (tx *Transaction) UnmarshalJSON(input []byte) error + func (tx *Transaction) Value() *big.Int + func (tx *Transaction) WithSignature(signer Signer, sig []byte) (*Transaction, error) + type Transactions []*Transaction + func TxDifference(a, b Transactions) (keep Transactions) + func (s Transactions) GetRlp(i int) []byte + func (s Transactions) Len() int + func (s Transactions) Swap(i, j int) + type TransactionsByPriceAndNonce struct + func NewTransactionsByPriceAndNonce(signer Signer, txs map[common.Address]Transactions) *TransactionsByPriceAndNonce + func (t *TransactionsByPriceAndNonce) Peek() *Transaction + func (t *TransactionsByPriceAndNonce) Pop() + func (t *TransactionsByPriceAndNonce) Shift() + type TxByNonce Transactions + func (s TxByNonce) Len() int + func (s TxByNonce) Less(i, j int) bool + func (s TxByNonce) Swap(i, j int) + type TxByPrice Transactions + func (s *TxByPrice) Pop() interface{} + func (s *TxByPrice) Push(x interface{}) + func (s TxByPrice) Len() int + func (s TxByPrice) Less(i, j int) bool + func (s TxByPrice) Swap(i, j int)