diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-04-19 15:22:48 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-04-19 15:22:48 +0800 |
commit | a6ca8fd26884807c80b649bd2a0e780aa93ced22 (patch) | |
tree | 5b0e615a854e31e10e7a606e9e44b51b910529e9 /eth/api.go | |
parent | 27116bd46cbc14a8eec9e1818945f1f10b9b834a (diff) | |
parent | a40e61b4ac44a4f64f057a4220a26cfe4b9dcf03 (diff) | |
download | go-tangerine-a6ca8fd26884807c80b649bd2a0e780aa93ced22.tar go-tangerine-a6ca8fd26884807c80b649bd2a0e780aa93ced22.tar.gz go-tangerine-a6ca8fd26884807c80b649bd2a0e780aa93ced22.tar.bz2 go-tangerine-a6ca8fd26884807c80b649bd2a0e780aa93ced22.tar.lz go-tangerine-a6ca8fd26884807c80b649bd2a0e780aa93ced22.tar.xz go-tangerine-a6ca8fd26884807c80b649bd2a0e780aa93ced22.tar.zst go-tangerine-a6ca8fd26884807c80b649bd2a0e780aa93ced22.zip |
Merge pull request #2463 from fjl/rpc-context-key
rpc: remove NotifierContextKey
Diffstat (limited to 'eth/api.go')
-rw-r--r-- | eth/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/api.go b/eth/api.go index 41387c27f..a0b1f8ac2 100644 --- a/eth/api.go +++ b/eth/api.go @@ -603,7 +603,7 @@ type NewBlocksArgs struct { // NewBlocks triggers a new block event each time a block is appended to the chain. It accepts an argument which allows // the caller to specify whether the output should contain transactions and in what format. func (s *PublicBlockChainAPI) NewBlocks(ctx context.Context, args NewBlocksArgs) (rpc.Subscription, error) { - notifier, supported := ctx.Value(rpc.NotifierContextKey).(rpc.Notifier) + notifier, supported := rpc.NotifierFromContext(ctx) if !supported { return nil, rpc.ErrNotificationsUnsupported } @@ -1345,7 +1345,7 @@ func (s *PublicTransactionPoolAPI) PendingTransactions() []*RPCTransaction { // NewPendingTransaction creates a subscription that is triggered each time a transaction enters the transaction pool // and is send from one of the transactions this nodes manages. func (s *PublicTransactionPoolAPI) NewPendingTransactions(ctx context.Context) (rpc.Subscription, error) { - notifier, supported := ctx.Value(rpc.NotifierContextKey).(rpc.Notifier) + notifier, supported := rpc.NotifierFromContext(ctx) if !supported { return nil, rpc.ErrNotificationsUnsupported } |