rpc/v2: optionally passing context argument to rpc v2 api methods

This commit is contained in:
zsfelfoldi
2015-12-09 18:28:07 +01:00
parent fa187a366d
commit f3aac71fad
8 changed files with 1122 additions and 18 deletions

View File

@@ -22,7 +22,6 @@ import (
"math/big"
"reflect"
"strings"
"sync"
"github.com/ethereum/go-ethereum/event"
@@ -41,6 +40,7 @@ type callback struct {
rcvr reflect.Value // receiver of method
method reflect.Method // callback
argTypes []reflect.Type // input argument types
hasCtx bool // method's first argument is a context (not included in argTypes)
errPos int // err return idx, of -1 when method cannot return error
isSubscribe bool // indication if the callback is a subscription
}