Merge branch 'master' into feature/new-theming-capabilites

* master:
  fix: ignore  messages without error
  Add CHANGELOG entry
  Make block size field nullable
pull/1844/head
Gabriel Rodriguez Alsina 6 years ago
commit 2a0c4798c8
  1. 2
      CHANGELOG.md
  2. 5
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex
  3. 5
      apps/explorer/lib/explorer/chain/block.ex
  4. 15
      apps/explorer/priv/repo/migrations/20190424170833_change_block_size_to_nullable.exs

@ -9,6 +9,7 @@
### Fixes
- [#1829](https://github.com/poanetwork/blockscout/pull/1829) - Handle nil quantities in block decoding routine
- [#1830](https://github.com/poanetwork/blockscout/pull/1830) - Make block size field nullable
### Chore
@ -43,6 +44,7 @@
- [#1802](https://github.com/poanetwork/blockscout/pull/1802) - make coinmarketcap's number of pages configurable
- [#1799](https://github.com/poanetwork/blockscout/pull/1799) - Use eth_getUncleByBlockHashAndIndex for uncle block fetching
- [#1531](https://github.com/poanetwork/blockscout/pull/1531) - docker: fix dockerFile for secp256k1 building
- [#1835](https://github.com/poanetwork/blockscout/pull/1835) - fix: ignore `pong` messages without error
### Chore

@ -152,6 +152,11 @@ defmodule EthereumJSONRPC.WebSocket.WebSocketClient do
@impl :websocket_client
def websocket_handle({:ping, ""}, _request, %__MODULE__{} = state), do: {:reply, {:pong, ""}, state}
@impl :websocket_client
def websocket_handle({:pong, _}, _request, state) do
{:ok, state}
end
@impl :websocket_client
def websocket_info({:"$gen_call", from, request}, _, %__MODULE__{} = state) do
case handle_call(request, from, state) do

@ -10,10 +10,9 @@ defmodule Explorer.Chain.Block do
alias Explorer.Chain.{Address, Gas, Hash, Transaction}
alias Explorer.Chain.Block.{Reward, SecondDegreeRelation}
@optional_attrs ~w(internal_transactions_indexed_at)a
@optional_attrs ~w(internal_transactions_indexed_at size)a
@required_attrs ~w(consensus difficulty gas_limit gas_used hash miner_hash nonce number parent_hash size timestamp
total_difficulty)a
@required_attrs ~w(consensus difficulty gas_limit gas_used hash miner_hash nonce number parent_hash timestamp total_difficulty)a
@typedoc """
How much work is required to find a hash with some number of leading 0s. It is measured in hashes for PoW

@ -0,0 +1,15 @@
defmodule Explorer.Repo.Migrations.ChangeBlockSizeToNullable do
use Ecto.Migration
def up do
alter table(:blocks) do
modify(:size, :integer, null: true)
end
end
def down do
alter table(:blocks) do
modify(:size, :integer, null: false)
end
end
end
Loading…
Cancel
Save