This file contains hidden or 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
EXPLAIN ANALYZE | |
SELECT | |
ht.id, ht.transaction_hash, ht.ledger_sequence, ht.application_order, ht.account, ht.account_sequence, ht.max_fee, | |
COALESCE(ht.fee_charged, ht.max_fee) as fee_charged, ht.operation_count, ht.tx_envelope, ht.tx_result, | |
ht.tx_meta, ht.tx_fee_meta, ht.created_at, ht.updated_at, COALESCE(ht.successful, true) as successful, | |
array_to_string(ht.signatures, ',') AS signatures, ht.memo_type, ht.memo, lower(ht.time_bounds) AS valid_after, | |
upper(ht.time_bounds) AS valid_before, hl.closed_at AS ledger_close_time, ht.inner_transaction_hash, ht.fee_account, | |
ht.new_max_fee, array_to_string(ht.inner_signatures, ',') AS inner_signatures | |
FROM history_transactions ht | |
LEFT JOIN history_ledgers hl |
This file contains hidden or 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
[ | |
{ | |
"memo": "6375332545341717", | |
"_links": { | |
"self": { | |
"href": "https://horizon.stellar.org/transactions/6fc37da9217c092dab9691a56ba6afc536d853c51c25fc0df180db398b3ec6dc" | |
}, | |
"account": { | |
"href": "https://horizon.stellar.org/accounts/GB3RMPTL47E4ULVANHBNCXSXM2ZA5JFY5ISDRERPCXNJUDEO73QFZUNK" | |
}, |
This file contains hidden or 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
[ | |
{ | |
"_links": { | |
"self": { | |
"href": "https://4a66d9db.ngrok.io/transactions/6644be14822dd9b66eae830cd6ec57c08f9be02ab048859cb27541941ad53650" | |
}, | |
"account": { | |
"href": "https://4a66d9db.ngrok.io/accounts/GAMFIL3N6PN5JSYF2DN3M5BJIXRA6AWZFFI3ZMYMNSIWC3CKGN4WE2ZL" | |
}, | |
"ledger": { |
This file contains hidden or 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
// AccountRequest contains data for making requests to the accounts | |
// endpoint of a horizon server. | |
// | |
// To fetch information for a single account: | |
// - Set `AccountID` to retrieve `AccountDetail`. | |
// - Set `AccountID` and `DataKey` to retrieve `AccountData`. | |
// | |
// To fetch information for multiple accounts: | |
// - Set `ForSigner` to retrieve all the `AccountDetail` who have the | |
// given account as a signer. |
This file contains hidden or 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
diff --git a/exp/ingest/io/postgres_temp_set.go b/exp/ingest/io/postgres_temp_set.go | |
index 4ca7432b..3d097a7c 100644 | |
--- a/exp/ingest/io/postgres_temp_set.go | |
+++ b/exp/ingest/io/postgres_temp_set.go | |
@@ -31,7 +31,7 @@ const ( | |
// If `Session` is passed, it will be cloned. | |
type PostgresTempSet struct { | |
DSN string | |
- Session *db.Session | |
+ Session db.SessionInterface |
This file contains hidden or 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
horizon_prod2=# select * from exp_history_effects where history_operation_id='119121304501768197' ORDER BY "order"; | |
history_account_id | history_operation_id | order | type | details | |
--------------------+----------------------+-------+------+----------------------------------------------------------------------------------------- | |
7080 | 119121304501768197 | 1 | 12 | {"weight": 2, "public_key": "GAL3BHRWF6FR6L4AKSKYPYJCNWXNVCURMFRDMQM3V5OU25PARPJS52AT"} | |
7080 | 119121304501768197 | 2 | 12 | {"weight": 2, "public_key": "GCMJGZHL7C7KU4U5D6GQMMBMDFMVJO3V3JQPPBZXY7A6N5KSU4QQEGG6"} | |
7080 | 119121304501768197 | 3 | 10 | {"weight": 2, "public_key": "GATHCV4BJI7PE75C6FNFV25NFWSF5KH2AEA3NZ3JYUGVHSNKBYEUQ5RT"} | |
(3 rows) | |
horizon_prod2=# select * from history_effects where history_operation_id='119121304501768197' ORDER BY "order"; | |
history_account_id | history_operation_id | order | type | |
This file contains hidden or 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
defmodule do | |
@moduledoc """ | |
Automatically generated on 2019-11-15T09:08:26-05:00 | |
DO NOT EDIT or your changes may be overwritten | |
Target implementation: exdr at https://hex.pm/packages/exdr | |
""" | |
use XDR.Base |
This file contains hidden or 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
+--------+--------+...+--------+--------+...+--------+ | |
| byte 0 | byte 1 |...|byte n-1| 0 |...| 0 | BLOCK | |
+--------+--------+...+--------+--------+...+--------+ | |
|<-----------n bytes---------->|<------r bytes------>| | |
|<-----------n+r (where (n+r) mod 4 = 0)>----------->| |
This file contains hidden or 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
// Follow the steps below to play with this: | |
// 1. git clone abuiles/json-xdr && cd json-xdr | |
// 2. yarn install (or npm install) | |
// 3. touch sandbox.js | |
// 4. Paste the content of this file in sandbox.js | |
// 5. Run like `node sandox` | |
const XDR = require('js-xdr') | |
const Cursor = require('cursor') | |
const jsonXDR = require('./dist/index') |
This file contains hidden or 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
defmodule Hub.JsonApiClient.Middleware.NormalizeAttributes do | |
@moduledoc """ | |
JsonApiClient middleware to convert attributes from kebab-case to snake_case. | |
""" | |
@behaviour JsonApiClient.Middleware | |
alias JsonApiClient.{Request} | |
@impl JsonApiClient.Middleware |