diff --git a/Boss/Mod/ActiveProber.cpp b/Boss/Mod/ActiveProber.cpp index a284e75b9..87467b75b 100644 --- a/Boss/Mod/ActiveProber.cpp +++ b/Boss/Mod/ActiveProber.cpp @@ -241,9 +241,7 @@ class ActiveProber::Run : public std::enable_shared_from_this { .start_object() .field("fromid", std::string(peer)) .field("id", std::string(dest)) - .field( "msatoshi" - , std::string(amount) - ) + .field("amount_msat", amount.to_msat()) /* I have written this many times, * but I never understood riskfactor. */ @@ -407,11 +405,8 @@ class ActiveProber::Run : public std::enable_shared_from_this { .field( "direction" , self_id > peer ? 1 : 0 ) - .field( "msatoshi" - , amount0.to_msat() - ) .field( "amount_msat" - , std::string(amount0) + , amount0.to_msat() ) .field("delay", delay0) .field("style", "tlv") diff --git a/Boss/Mod/ChannelCandidateMatchmaker.cpp b/Boss/Mod/ChannelCandidateMatchmaker.cpp index 63d012162..a063cdff7 100644 --- a/Boss/Mod/ChannelCandidateMatchmaker.cpp +++ b/Boss/Mod/ChannelCandidateMatchmaker.cpp @@ -100,7 +100,7 @@ class ChannelCandidateMatchmaker::Run /* 2x because the dowser will halve the channel * capacity of the first hop. */ - .field("msatoshi", std::string(2.0 * min_channel)) + .field("amount_msat", (2.0 * min_channel).to_msat()) /* No real idea how to think about * riskfactor. */ diff --git a/Boss/Mod/Dowser.cpp b/Boss/Mod/Dowser.cpp index c01778a05..2aee8d57d 100644 --- a/Boss/Mod/Dowser.cpp +++ b/Boss/Mod/Dowser.cpp @@ -125,7 +125,7 @@ class Dowser::Run : public std::enable_shared_from_this { .start_object() .field("id", std::string(toid)) .field("fromid", std::string(fromid)) - .field("msatoshi", "1msat") + .field("amount_msat", 1) /* I never had a decent grasp of * riskfactor. */ .field("riskfactor", 10.0) diff --git a/Boss/Mod/FundsMover/Attempter.cpp b/Boss/Mod/FundsMover/Attempter.cpp index 6fb5e4d5e..1849d033f 100644 --- a/Boss/Mod/FundsMover/Attempter.cpp +++ b/Boss/Mod/FundsMover/Attempter.cpp @@ -125,9 +125,7 @@ class Attempter::Impl : public std::enable_shared_from_this { auto parms = Json::Out() .start_object() .field("id", std::string(destination)) - .field( "msatoshi" - , std::string(dest_amount) - ) + .field("amount_msat", dest_amount.to_msat()) .field("riskfactor", 10) .field("cltv", cltv_delta + 14) .field("fromid", std::string(source)) @@ -463,10 +461,7 @@ class Attempter::Impl : public std::enable_shared_from_this { .field( "direction" , self_id > source ? 1 : 0 ) - .field("msatoshi", source_amount.to_msat()) - .field( "amount_msat" - , std::string(source_amount) - ) + .field("amount_msat", source_amount.to_msat()) .field("delay", source_delay) /* This used to be an explicit "style": "legacy", * since we did not want to have to parse listnodes @@ -501,8 +496,7 @@ class Attempter::Impl : public std::enable_shared_from_this { .field( "direction" , destination > self_id ? 1 : 0 ) - .field("msatoshi", amount.to_msat()) - .field("amount_msat", std::string(amount)) + .field("amount_msat", amount.to_msat()) .field("delay", 14) /* We always support "tlv", at least for now... */ .field("style", "tlv")