Переглянути джерело

ethclient: fix new block->header subscription endpoint

Péter Szilágyi 9 роки тому
батько
коміт
ca37730c9d
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      ethclient/ethclient.go

+ 1 - 1
ethclient/ethclient.go

@@ -227,7 +227,7 @@ func (ec *Client) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, err
 // SubscribeNewHead subscribes to notifications about the current blockchain head
 // on the given channel.
 func (ec *Client) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error) {
-	return ec.c.EthSubscribe(ctx, ch, "newBlocks", map[string]struct{}{})
+	return ec.c.EthSubscribe(ctx, ch, "newHeads", map[string]struct{}{})
 }
 
 // State Access