Documentation
¶
Index ¶
- type MockChain
- func (m *MockChain) AddBlock(hash string)
- func (m *MockChain) AddHeader(h spec.BlockHeader)
- func (m *MockChain) EstimateFee(ctx context.Context, confirmTarget int) (koinuPerKB koinu.Koinu, err error)
- func (m *MockChain) GetBestBlockHash(ctx context.Context) (string, error)
- func (m *MockChain) GetBlock(blockHash string, ctx context.Context) (doge.Block, int, error)
- func (m *MockChain) GetBlockCount(ctx context.Context) (int64, error)
- func (m *MockChain) GetBlockHash(blockHeight int64, ctx context.Context) (string, error)
- func (m *MockChain) GetBlockHeader(blockHash string, ctx context.Context) (spec.BlockHeader, error)
- func (m *MockChain) GetBlockchainInfo(ctx context.Context) (spec.BlockchainInfo, error)
- func (m *MockChain) GetRawMempool(ctx context.Context) (spec.RawMempool, error)
- func (m *MockChain) GetRawMempoolTxList(ctx context.Context) ([]string, error)
- func (m *MockChain) GetRawTransaction(ctx context.Context, txID string) (doge.BlockTx, error)
- func (m *MockChain) RetryMode(attempts int, delay time.Duration) spec.Blockchain
- func (m *MockChain) SendRawTransaction(ctx context.Context, txHex string) (string, error)
- func (m *MockChain) SetHeight(height int64, hash string)
- func (m *MockChain) WaitForSync(ctx context.Context) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockChain ¶
type MockChain struct {
// contains filtered or unexported fields
}
MockChain is a simple in-memory implementation of spec.Blockchain for tests.
func NewMockChain ¶
func NewMockChain() *MockChain
func (*MockChain) AddHeader ¶
func (m *MockChain) AddHeader(h spec.BlockHeader)
Helpers for constructing chains in tests.
func (*MockChain) EstimateFee ¶
func (*MockChain) GetBestBlockHash ¶
Unused by current tests; minimal stubs provided.
func (*MockChain) GetBlockCount ¶
func (*MockChain) GetBlockHash ¶
func (*MockChain) GetBlockHeader ¶
func (*MockChain) GetBlockchainInfo ¶
func (*MockChain) GetRawMempool ¶
func (*MockChain) GetRawMempoolTxList ¶
func (*MockChain) GetRawTransaction ¶
func (*MockChain) SendRawTransaction ¶
Click to show internal directories.
Click to hide internal directories.