Skip to content

Commit

Permalink
name heights: output as an array of dicts
Browse files Browse the repository at this point in the history
this enables backward compatibility with code that uses name_history
  • Loading branch information
mhanne committed Jun 25, 2016
1 parent f891470 commit ff4916a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/names_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def heights
txs = STORE.db[:tx].where(id: txouts.map {|o| o[:tx_id] })
blk_txs = STORE.db[:blk_tx].where(tx_id: txs.map {|t| t[:id]})
blocks = STORE.db[:blk].where(id: blk_txs.map {|b| b[:blk_id] }, chain: 0)
respond_with(blocks.map {|b| b[:height] })
respond_with(blocks.map {|b| { height: b[:height] } })
end

private
Expand Down

0 comments on commit ff4916a

Please sign in to comment.