The CAmount name is not helpful as its just an int64_t and not a class, like the name implies. There were a handful of places where it was passed in as const-ref, as a good example of this actually creating sub-par code.
Same compile fixes as before, now also for builds that compile the test wallet.
https://github.com/bitcoin/bitcoin/pull/13774/files