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 {
44
44
45
45
// Resolve retrieves the full transaction belonging to a lazy handle if it is still
46
46
// 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).
47
53
func (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
50
56
}
51
- return ltx .Tx
57
+ return ltx .Pool . Get ( ltx . Hash )
52
58
}
53
59
54
60
// LazyResolver is a minimal interface needed for a transaction pool to satisfy
You can’t perform that action at this time.
0 commit comments