From 770c5fe7e3e708cf1ecd6eb6e60b87978b42bd48 Mon Sep 17 00:00:00 2001 From: bogdan-rosianu Date: Wed, 15 Sep 2021 10:53:52 +0300 Subject: [PATCH 1/4] added HeaderTotalGas in ArgsSaveBlockData --- data/indexer/dtos.go | 1 + 1 file changed, 1 insertion(+) diff --git a/data/indexer/dtos.go b/data/indexer/dtos.go index 0b253e239..413f794bd 100644 --- a/data/indexer/dtos.go +++ b/data/indexer/dtos.go @@ -13,6 +13,7 @@ type ArgsSaveBlockData struct { Header data.HeaderHandler SignersIndexes []uint64 NotarizedHeadersHashes []string + HeaderTotalGas uint64 TransactionsPool *Pool } From d01a5b3cd3eb0f10107c3252675038dd722e41db Mon Sep 17 00:00:00 2001 From: bogdan-rosianu Date: Wed, 15 Sep 2021 11:27:49 +0300 Subject: [PATCH 2/4] added max gas per block --- data/indexer/dtos.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/indexer/dtos.go b/data/indexer/dtos.go index 413f794bd..b4e971885 100644 --- a/data/indexer/dtos.go +++ b/data/indexer/dtos.go @@ -13,10 +13,16 @@ type ArgsSaveBlockData struct { Header data.HeaderHandler SignersIndexes []uint64 NotarizedHeadersHashes []string - HeaderTotalGas uint64 + HeaderGasConsumption HeaderGasConsumption TransactionsPool *Pool } +// HeaderGasConsumption holds the data needed to save gas consumption of a header +type HeaderGasConsumption struct { + GasConsumed uint64 + MaxGasPerBlock uint64 +} + // Pool will holds all types of transaction type Pool struct { Txs map[string]data.TransactionHandler From d33de47c4e093eabaad7786f05d4c3bea6538f32 Mon Sep 17 00:00:00 2001 From: bogdan-rosianu Date: Fri, 17 Sep 2021 18:28:51 +0300 Subject: [PATCH 3/4] added gas returned --- data/indexer/dtos.go | 1 + 1 file changed, 1 insertion(+) diff --git a/data/indexer/dtos.go b/data/indexer/dtos.go index b4e971885..4d084ad32 100644 --- a/data/indexer/dtos.go +++ b/data/indexer/dtos.go @@ -20,6 +20,7 @@ type ArgsSaveBlockData struct { // HeaderGasConsumption holds the data needed to save gas consumption of a header type HeaderGasConsumption struct { GasConsumed uint64 + GasReturned uint64 MaxGasPerBlock uint64 } From d6e10327a8c0838665cebd2707fca6f51aaf141c Mon Sep 17 00:00:00 2001 From: bogdan-rosianu Date: Fri, 17 Sep 2021 18:31:34 +0300 Subject: [PATCH 4/4] renaming --- data/indexer/dtos.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/indexer/dtos.go b/data/indexer/dtos.go index 4d084ad32..b7b96250a 100644 --- a/data/indexer/dtos.go +++ b/data/indexer/dtos.go @@ -20,7 +20,7 @@ type ArgsSaveBlockData struct { // HeaderGasConsumption holds the data needed to save gas consumption of a header type HeaderGasConsumption struct { GasConsumed uint64 - GasReturned uint64 + GasRefunded uint64 MaxGasPerBlock uint64 }