forked from nervosnetwork/ckb-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add transaction propagation delays
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class TransactionPropagationDelay < ApplicationRecord | ||
end | ||
|
||
# == Schema Information | ||
# | ||
# Table name: transaction_propagation_delays | ||
# | ||
# id :bigint not null, primary key | ||
# tx_hash :string | ||
# created_at_unixtimestamp :integer | ||
# durations :jsonb | ||
# created_at :datetime not null | ||
# updated_at :datetime not null | ||
# | ||
# Indexes | ||
# | ||
# index_tx_propagation_timestamp (created_at_unixtimestamp) | ||
# |
13 changes: 13 additions & 0 deletions
13
db/migrate/20200513032346_create_transaction_propagation_delays.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class CreateTransactionPropagationDelays < ActiveRecord::Migration[6.0] | ||
def change | ||
create_table :transaction_propagation_delays do |t| | ||
t.string :tx_hash | ||
t.integer :created_at_unixtimestamp | ||
t.jsonb :durations | ||
|
||
t.timestamps | ||
end | ||
|
||
add_index :transaction_propagation_delays, :created_at_unixtimestamp, name: "index_tx_propagation_timestamp" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters