upgrade web3.js with _extend support

This commit is contained in:
Bas van Kervel
2015-06-10 09:42:14 +02:00
committed by Bas van Kervel
parent 1fe617fa57
commit 7584e68c21
7 changed files with 51 additions and 6 deletions

View File

@ -7,6 +7,10 @@ import (
"github.com/ethereum/go-ethereum/xeth"
)
const (
TxPoolApiVersion = "1.0"
)
var (
// mapping between methods and handlers
txpoolMapping = map[string]txpoolhandler{
@ -59,6 +63,10 @@ func (self *txPoolApi) Name() string {
return TxPoolApiName
}
func (self *txPoolApi) ApiVersion() string {
return TxPoolApiVersion
}
func (self *txPoolApi) Status(req *shared.Request) (interface{}, error) {
return map[string]int{
"pending": self.ethereum.TxPool().GetTransactions().Len(),