File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,17 @@ type LazyTransaction struct {
4444
4545// Resolve retrieves the full transaction belonging to a lazy handle if it is still
4646// maintained by the transaction pool.
47+ //
48+ // Note, the method will *not* cache the retrieved transaction if the original
49+ // pool has not cached it. The idea being, that if the tx was too big to insert
50+ // originally, silently saving it will cause more trouble down the line (and
51+ // indeed seems to have caused a memory bloat in the original implementation
52+ // which did just that).
4753func (ltx * LazyTransaction ) Resolve () * types.Transaction {
48- if ltx .Tx = = nil {
49- ltx . Tx = ltx .Pool . Get ( ltx . Hash )
54+ if ltx .Tx ! = nil {
55+ return ltx .Tx
5056 }
51- return ltx .Tx
57+ return ltx .Pool . Get ( ltx . Hash )
5258}
5359
5460// LazyResolver is a minimal interface needed for a transaction pool to satisfy
You can’t perform that action at this time.
0 commit comments