• Felix Lange's avatar
    eth, xeth: fix GasPriceOracle goroutine leak · ae1b5b3f
    Felix Lange authored
    XEth.gpo was being initialized as needed. WithState copies the XEth
    struct including the gpo field. If gpo was nil at the time of the copy
    and Call or Transact were invoked on it, an additional GPO listenLoop
    would be spawned.
    
    Move the lazy initialization to GasPriceOracle instead so the same GPO
    instance is shared among all created XEths.
    
    Fixes #1317
    Might help with #1930
    ae1b5b3f
xeth.go 26.7 KB