Separate repositories (#25)
* Separate Repository into multiple Repositories * Use struct scan for transactions * Use struct scan for blocks * Remove unused block repo methods * Update naming * Rename / Cleanup repository related fields
This commit is contained in:
+15
-15
@@ -1,20 +1,20 @@
|
||||
package core
|
||||
|
||||
type Block struct {
|
||||
Reward float64
|
||||
Difficulty int64
|
||||
ExtraData string
|
||||
GasLimit int64
|
||||
GasUsed int64
|
||||
Hash string
|
||||
IsFinal bool
|
||||
Miner string
|
||||
Nonce string
|
||||
Number int64
|
||||
ParentHash string
|
||||
Size int64
|
||||
Time int64
|
||||
Reward float64 `db:"block_reward"`
|
||||
Difficulty int64 `db:"block_difficulty"`
|
||||
ExtraData string `db:"block_extra_data"`
|
||||
GasLimit int64 `db:"block_gaslimit"`
|
||||
GasUsed int64 `db:"block_gasused"`
|
||||
Hash string `db:"block_hash"`
|
||||
IsFinal bool `db:"is_final"`
|
||||
Miner string `db:"block_miner"`
|
||||
Nonce string `db:"block_nonce"`
|
||||
Number int64 `db:"block_number"`
|
||||
ParentHash string `db:"block_parenthash"`
|
||||
Size int64 `db:"block_size"`
|
||||
Time int64 `db:"block_time"`
|
||||
Transactions []Transaction
|
||||
UncleHash string
|
||||
UnclesReward float64
|
||||
UncleHash string `db:"uncle_hash"`
|
||||
UnclesReward float64 `db:"block_uncles_reward"`
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package core_test
|
||||
|
||||
import (
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestVulcanizedb(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Vulcanizedb Suite")
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
package core
|
||||
|
||||
type Transaction struct {
|
||||
Hash string
|
||||
Data string
|
||||
Nonce uint64
|
||||
To string
|
||||
From string
|
||||
GasLimit int64
|
||||
GasPrice int64
|
||||
Hash string `db:"tx_hash"`
|
||||
Data string `db:"tx_input_data"`
|
||||
Nonce uint64 `db:"tx_nonce"`
|
||||
To string `db:"tx_to"`
|
||||
From string `db:"tx_from"`
|
||||
GasLimit int64 `db:"tx_gaslimit"`
|
||||
GasPrice int64 `db:"tx_gasprice"`
|
||||
Receipt
|
||||
Value string
|
||||
Value string `db:"tx_value"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user