Documentation ¶
Index ¶
- Constants
- func SimulateTransaction(id int)
- type ChainInfoCmd
- type Mining
- func (mi *Mining) AddTransactionToPool(key string, data *blockchain.Transaction) bool
- func (mi *Mining) BroadcasTransaction(t *blockchain.Transaction)
- func (mi *Mining) BroadcastNewBlock(b *blockchain.Block)
- func (mi *Mining) DeleteTransactionsFromPool(keys []string)
- func (mi *Mining) GetTargetNodePoS(nodes [config.MAX_SC * config.MAX_SC_PEER]dtype.NodeInfo) *dtype.NodeInfo
- func (mi *Mining) GetTransactionsFromPool() []*blockchain.Transaction
- func (mi *Mining) SetHttpRouter(m *mux.Router)
- func (mi *Mining) ShowTransactionsFromPool()
- func (mi *Mining) StartMiningNewBlock(status *string)
- func (mi *Mining) UpdateTransactionPool(block *blockchain.Block)
- type SensorData
- type WalletMgr
Constants ¶
View Source
const TPERIOD int = config.BLOCK_CREATE_PERIOD * 1000000000
Variables ¶
This section is empty.
Functions ¶
func SimulateTransaction ¶
func SimulateTransaction(id int)
Types ¶
type ChainInfoCmd ¶
type ChainInfoCmd struct {
Cmd string `json:"cmd"`
}
type Mining ¶
type Mining struct {
// contains filtered or unexported fields
}
func MiningInst ¶
func MiningInst() *Mining
func (*Mining) AddTransactionToPool ¶
func (mi *Mining) AddTransactionToPool(key string, data *blockchain.Transaction) bool
Add transaction to the pool true : If new transaction false : the transaction already exists in the pool
func (*Mining) BroadcasTransaction ¶
func (mi *Mining) BroadcasTransaction(t *blockchain.Transaction)
Update peers list
func (*Mining) BroadcastNewBlock ¶
func (mi *Mining) BroadcastNewBlock(b *blockchain.Block)
func (*Mining) DeleteTransactionsFromPool ¶
func (*Mining) GetTargetNodePoS ¶
func (*Mining) GetTransactionsFromPool ¶
func (mi *Mining) GetTransactionsFromPool() []*blockchain.Transaction
func (*Mining) SetHttpRouter ¶
func (*Mining) ShowTransactionsFromPool ¶
func (mi *Mining) ShowTransactionsFromPool()
func (*Mining) StartMiningNewBlock ¶
func (*Mining) UpdateTransactionPool ¶
func (mi *Mining) UpdateTransactionPool(block *blockchain.Block)
type SensorData ¶
Click to show internal directories.
Click to hide internal directories.