Use 'amounts' for local varibale name

This commit is contained in:
Tobin C. Harding 2020-10-27 10:05:20 +11:00
parent b8130d23a6
commit 8f5a989ad1

View File

@ -46,9 +46,11 @@ pub async fn swap(
} }
OutEvent::Request(amounts::OutEvent::Btc { btc, channel }) => { OutEvent::Request(amounts::OutEvent::Btc { btc, channel }) => {
debug!("Got request from Bob to swap {}", btc); debug!("Got request from Bob to swap {}", btc);
let p = calculate_amounts(btc); let amounts = calculate_amounts(btc);
last_amounts = Some(p); // TODO: We cache the last amounts returned, this needs improving along with
swarm.send_amounts(channel, p); // verification of message 0.
last_amounts = Some(amounts);
swarm.send_amounts(channel, amounts);
} }
OutEvent::Message0(msg) => { OutEvent::Message0(msg) => {
// We don't want Bob to be able to crash us by sending an out of // We don't want Bob to be able to crash us by sending an out of