Andrew Chow 174b821e64
Merge bitcoin/bitcoin#25427: wallet: remove extra wtx lookup in AddToSpends
32e5edc0f454c59c8e0d8d86a9abfa9a3f25ca28 wallet: avoid extra wtx lookup in AddToSpends (furszy)

Pull request description:

  As `AddToSpends` is only called from `AddToWallet` and `LoadToWallet`, places where we insert the wtx into the wallet map, we can directly feed `AddToSpends` with the `wtx` and remove another extra lookup.

ACKs for top commit:
  laanwj:
    Code review ACK 32e5edc0f454c59c8e0d8d86a9abfa9a3f25ca28
  achow101:
    ACK 32e5edc0f454c59c8e0d8d86a9abfa9a3f25ca28
  theStack:
    Code-review ACK 32e5edc0f454c59c8e0d8d86a9abfa9a3f25ca28
  w0xlt:
    Code Review ACK 32e5edc0f4
  brunoerg:
    crACK 32e5edc0f454c59c8e0d8d86a9abfa9a3f25ca28

Tree-SHA512: e9fb8df44c3e3fa26c107d261bf78e45014b4755890a64817f2be62ee6b7751f5dd2813a18dcb103a21ddba1422f9d2d59c4bf186f08314e634365d36b01be8f
2022-06-21 20:56:24 -04:00
..
2022-02-01 08:44:51 -03:00