mirror of
https://github.com/Blockstream/satellite-api.git
synced 2025-02-22 13:42:33 +01:00
ceil not floor #2
This commit is contained in:
parent
b14dfac9b2
commit
50835c03d8
1 changed files with 1 additions and 1 deletions
2
main.rb
2
main.rb
|
@ -130,7 +130,7 @@ post '/order' do
|
|||
order.message_size = message_size
|
||||
order.message_digest = sha256.to_s
|
||||
|
||||
message_size_with_overhead = message_size + FRAMING_OVERHEAD_PER_FRAGMENT * (message_size / FRAGMENT_SIZE).floor
|
||||
message_size_with_overhead = message_size + FRAMING_OVERHEAD_PER_FRAGMENT * (message_size / FRAGMENT_SIZE).ceil
|
||||
|
||||
if bid.to_f / message_size_with_overhead.to_f < MIN_PER_BYTE_BID
|
||||
halt 413, {:message => "Bid too low", :errors => ["Per byte bid cannot be below #{MIN_PER_BYTE_BID} millisatoshis per byte. The minimum bid for this message is #{message_size_with_overhead * MIN_PER_BYTE_BID} millisatoshis." ]}.to_json
|
||||
|
|
Loading…
Add table
Reference in a new issue