Documentation
¶
Index ¶
- Constants
- func RKey(micSys, from, to common.Address) []byte
- func UserKey(micSys, from, to common.Address) []byte
- type BroadCast
- type CreditAuthor
- type MicChain
- type MicroTX
- type MinerAccManager
- type MinerReceipt
- type MinerTxData
- type Receipt
- type ReceiptSync
- type TxData
- type UserAccManager
- type UserAccount
- type UserReceiptQuery
- type VersionManager
Constants ¶
View Source
const ( MicroPayHashPrefix = "\x19Ethereum Signed Message:\n32" DBKeyMicChainUserVersion = "%s_DBKey_MicChain_User_Data_Version_%s" DBKeyMicChainMinerVersion = "%s_DBKey_MicChain_Miner_Data_Version_%s" DBKeyUserData = "%s_DBKey_Local_User_Data_%s_%s" DBKeyLocalReceipt = "%s_DBKey_Local_Receipt_Data_%s_%s" DBKeyLocalMinerAccount = "%s_DBKey_Local_Miner_Account_%s_%s" BlockChainVersionSyncInterval = time.Second * 13 )
View Source
const ( ReceiptSyncTypeUser = iota ReceiptSyncTypeMiner )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BroadCast ¶
type CreditAuthor ¶
type CreditAuthor struct { Contract common.Address `json:"contract"` TokenAddr common.Address `json:"token"` }
func (*CreditAuthor) Verify ¶
func (ca *CreditAuthor) Verify(conf *com.EthereumConfig) bool
type MicChain ¶
type MicChain struct {
// contains filtered or unexported fields
}
func (*MicChain) WaitRcpReader ¶
func (mc *MicChain) WaitRcpReader(sig chan struct{})
func (*MicChain) WaitTxInput ¶
func (mc *MicChain) WaitTxInput(sig chan struct{})
type MinerAccManager ¶
type MinerAccManager struct {
// contains filtered or unexported fields
}
type MinerReceipt ¶
type MinerReceipt struct { Sig []byte *MinerTxData `json:"MinerTxData"` }
func (*MinerReceipt) String ¶
func (syn *MinerReceipt) String() string
func (*MinerReceipt) Verify ¶
func (syn *MinerReceipt) Verify() bool
type MinerTxData ¶
type MinerTxData struct { PackMined *big.Int `json:"mined"` LastMicNonce int64 `json:"lastNonce"` EthData *eth.MinerData `json:"EthData"` }
func (*MinerTxData) String ¶
func (mtd *MinerTxData) String() string
type ReceiptSync ¶
type ReceiptSync struct { Typ int MR *MinerReceipt URQ *UserReceiptQuery }
type TxData ¶
type TxData struct { Epoch int64 `json:"CN"` Nonce int64 `json:"nonce"` Time time.Time `json:"time"` Miner account.ID `json:"minerID"` From common.Address `json:"from"` To common.Address `json:"to"` Amount *big.Int `json:"amount"` Credit *big.Int `json:"credit"` Author *CreditAuthor `json:"author"` }
type UserAccManager ¶
type UserAccount ¶
type UserAccount struct { UserAddr common.Address `json:"user"` PoolAddr common.Address `json:"pool"` Nonce int64 `json:"nonce"` TokenBalance *big.Int `json:"balance"` PacketBalance *big.Int `json:"reminder"` Expire time.Time `json:"expire"` Epoch int64 `json:"epoch"` Credit *big.Int `json:"credit"` MicroNonce int64 `json:"microNonce"` }
func (*UserAccount) String ¶
func (ua *UserAccount) String() string
type UserReceiptQuery ¶
func (*UserReceiptQuery) String ¶
func (urq *UserReceiptQuery) String() string
type VersionManager ¶
Click to show internal directories.
Click to hide internal directories.