mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
- Solidity Upgraded up to v0.8.0 - Fixed and Added eth_chainId - Fix error in TransactionRecipet - Reward halving issue fixed
37 lines
874 B
Go
37 lines
874 B
Go
package XDCxlending
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"sync"
|
|
"time"
|
|
)
|
|
|
|
// List of errors
|
|
var (
|
|
ErrOrderNonceTooLow = errors.New("OrderNonce too low")
|
|
ErrOrderNonceTooHigh = errors.New("OrderNonce too high")
|
|
)
|
|
|
|
// PublicXDCXLendingAPI provides the XDCX RPC service that can be
|
|
// use publicly without security implications.
|
|
type PublicXDCXLendingAPI struct {
|
|
t *Lending
|
|
mu sync.Mutex
|
|
lastUsed map[string]time.Time // keeps track when a filter was polled for the last time.
|
|
|
|
}
|
|
|
|
// NewPublicXDCXLendingAPI create a new RPC XDCX service.
|
|
func NewPublicXDCXLendingAPI(t *Lending) *PublicXDCXLendingAPI {
|
|
api := &PublicXDCXLendingAPI{
|
|
t: t,
|
|
lastUsed: make(map[string]time.Time),
|
|
}
|
|
return api
|
|
}
|
|
|
|
// Version returns the Lending sub-protocol version.
|
|
func (api *PublicXDCXLendingAPI) Version(ctx context.Context) string {
|
|
return ProtocolVersionStr
|
|
}
|