Compare commits
19 Commits
master
...
staging-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a586ce22e6 | ||
|
|
8859e21b02 | ||
|
|
d4af0f5e14 | ||
| bbc9239a27 | |||
|
|
823d0f992d | ||
|
|
8e18ca0e32 | ||
|
|
e21decd769 | ||
|
|
e1d6493a2e | ||
| d5eeb47199 | |||
| 9fda269d8d | |||
|
|
23b13cc814 | ||
|
|
9fa5ee3618 | ||
|
|
d1a0c9326b | ||
|
|
e5c4c0dc65 | ||
|
|
d90608d8eb | ||
|
|
ac1da72ba8 | ||
|
|
f821c02dbc | ||
|
|
3c83f1af21 | ||
|
|
9003df740d |
41
.github/workflows/build-release-flo-deb.yml
vendored
Normal file
41
.github/workflows/build-release-flo-deb.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: Create Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- flo
|
||||
|
||||
jobs:
|
||||
build-and-release-flo-deb:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build .deb File
|
||||
run: |
|
||||
make all-flo
|
||||
mkdir -p release
|
||||
mv ./build/*.deb ./release/
|
||||
timeout-minutes: 130 # Adjust the timeout according to the estimated duration of "make all-flo"
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: FLO # Use the commit SHA as the tag name
|
||||
release_name: Release FLO # Use the commit SHA as the release name
|
||||
body: |
|
||||
Release commit: ${{ github.sha }}
|
||||
Commit message: ${{ github.event.head_commit.message }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload .deb File
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: deb-file
|
||||
path: ./release/*.deb
|
||||
80
README.md
80
README.md
@ -1,4 +1,84 @@
|
||||
[](https://goreportcard.com/report/trezor/blockbook)
|
||||
[](https://github.com/ranchimall/blockbook/actions/workflows/build-release-flo-deb.yml)
|
||||
|
||||
# IMPORTANT Changes needed to migrate to blockbook from flosight
|
||||
1. blockbook URL link
|
||||
2. API URIs (path)
|
||||
3. response object path for tx vin floID (for processes that need to find sender id from tx details)
|
||||
4. The link for fetching details of transactions for every ADDRESS has changed slightly
|
||||
|
||||
For point 3
|
||||
|
||||
We need to change
|
||||
|
||||
vin[x].addr
|
||||
to
|
||||
vin[x].addresses[0]
|
||||
|
||||
===
|
||||
|
||||
For UI
|
||||
|
||||
OLD BLOCK LINK
|
||||
https://flosight.duckdns.org/block/48fb49a89317c0852eb894b0251ae3c830621d416b2481ecd1d541d0b01e5ab8
|
||||
|
||||
https://flosight.duckdns.org/api/block/48fb49a89317c0852eb894b0251ae3c830621d416b2481ecd1d541d0b01e5ab8
|
||||
|
||||
NEW BLOCK LINK
|
||||
https://blockbook.ranchimall.net/block/48fb49a89317c0852eb894b0251ae3c830621d416b2481ecd1d541d0b01e5ab8
|
||||
|
||||
https://blockbook.ranchimall.net/api/block/48fb49a89317c0852eb894b0251ae3c830621d416b2481ecd1d541d0b01e5ab8
|
||||
|
||||
OLD tx LINK
|
||||
https://flosight.duckdns.org/tx/ae7886df36832824e0e0f37cd003150cc7222e35bc7320d226f1561a598ce39a
|
||||
|
||||
https://flosight.duckdns.org/api/tx/ae7886df36832824e0e0f37cd003150cc7222e35bc7320d226f1561a598ce39a
|
||||
|
||||
NEW tx LINK
|
||||
https://blockbook.ranchimall.net/tx/ae7886df36832824e0e0f37cd003150cc7222e35bc7320d226f1561a598ce39a
|
||||
|
||||
https://blockbook.ranchimall.net/api/tx/ae7886df36832824e0e0f37cd003150cc7222e35bc7320d226f1561a598ce39a
|
||||
|
||||
Make this change for sender address in tx API here
|
||||
|
||||
vin[x].addr
|
||||
to
|
||||
vin[x].addresses[0]
|
||||
|
||||
OLD Address LINK
|
||||
https://flosight.duckdns.org/address/F9RgXE1WYxHwvejktpi6EnjnscEkpiWxvS
|
||||
|
||||
https://flosight.duckdns.org/api/address/F9RgXE1WYxHwvejktpi6EnjnscEkpiWxvS
|
||||
|
||||
NEW ADDRESS LINK
|
||||
https://blockbook.ranchimall.net/address/F9RgXE1WYxHwvejktpi6EnjnscEkpiWxvS
|
||||
|
||||
https://blockbook.ranchimall.net/api/address/F9RgXE1WYxHwvejktpi6EnjnscEkpiWxvS
|
||||
|
||||
===
|
||||
OTHER CHANGES
|
||||
OLD
|
||||
https://flosight.ranchimall.net/api/addrs/FBL45szT4jDQmViVirUxPeJjn1tkCDMxeT/txs
|
||||
|
||||
https://flosight.ranchimall.net/api/addrs/FBL45szT4jDQmViVirUxPeJjn1tkCDMxeT/txs?from=0&to=359
|
||||
|
||||
NEW
|
||||
https://blockbook.ranchimall.net/api/address/FBL45szT4jDQmViVirUxPeJjn1tkCDMxeT?details=basic
|
||||
|
||||
https://blockbook.ranchimall.net/api/address/FBL45szT4jDQmViVirUxPeJjn1tkCDMxeT?details=txs
|
||||
|
||||
with paging for address
|
||||
https://blockbook.ranchimall.net/api/address/FBL45szT4jDQmViVirUxPeJjn1tkCDMxeT?details=txs?details=txs&page=2
|
||||
|
||||
==
|
||||
|
||||
OLD LINK FOR DIRECT BALANCE QUERY
|
||||
https://flosight.duckdns.org/api/addr/FBL45szT4jDQmViVirUxPeJjn1tkCDMxeT/balance
|
||||
|
||||
NO BLOCKBOOK EQUIVALENT
|
||||
THIS HAS TO BE FETCHED FROM THIS FORMAT
|
||||
https://blockbook.ranchimall.net/api/address/FBL45szT4jDQmViVirUxPeJjn1tkCDMxeT?details=basic
|
||||
|
||||
|
||||
# Blockbook
|
||||
|
||||
|
||||
@ -2,7 +2,8 @@ package api
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
)
|
||||
|
||||
@ -21,9 +22,10 @@ type VinV1 struct {
|
||||
ScriptSig ScriptSigV1 `json:"scriptSig"`
|
||||
AddrDesc bchain.AddressDescriptor `json:"-"`
|
||||
Addresses []string `json:"addresses"`
|
||||
IsAddress bool `json:"-"`
|
||||
Value string `json:"value"`
|
||||
ValueSat big.Int `json:"-"`
|
||||
IsAddress bool `json:"isAddress"`
|
||||
Value float64 `json:"value"`
|
||||
ValueSat big.Int `json:"valueSat"`
|
||||
Coinbase string `json:"coinbase,omitempty"`
|
||||
}
|
||||
|
||||
// ScriptPubKeyV1 is used for legacy api v1
|
||||
@ -32,14 +34,14 @@ type ScriptPubKeyV1 struct {
|
||||
Asm string `json:"asm,omitempty"`
|
||||
AddrDesc bchain.AddressDescriptor `json:"-"`
|
||||
Addresses []string `json:"addresses"`
|
||||
IsAddress bool `json:"-"`
|
||||
IsAddress bool `json:"isAddress"`
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// VoutV1 is used for legacy api v1
|
||||
type VoutV1 struct {
|
||||
Value string `json:"value"`
|
||||
ValueSat big.Int `json:"-"`
|
||||
Value float64 `json:"value"`
|
||||
ValueSat big.Int `json:"valueSat"`
|
||||
N int `json:"n"`
|
||||
ScriptPubKey ScriptPubKeyV1 `json:"scriptPubKey"`
|
||||
Spent bool `json:"spent"`
|
||||
@ -52,7 +54,7 @@ type VoutV1 struct {
|
||||
type TxV1 struct {
|
||||
Txid string `json:"txid"`
|
||||
Version int32 `json:"version,omitempty"`
|
||||
Locktime uint32 `json:"locktime,omitempty"`
|
||||
Locktime uint32 `json:"locktime"`
|
||||
Vin []VinV1 `json:"vin"`
|
||||
Vout []VoutV1 `json:"vout"`
|
||||
Blockhash string `json:"blockhash,omitempty"`
|
||||
@ -60,24 +62,29 @@ type TxV1 struct {
|
||||
Confirmations uint32 `json:"confirmations"`
|
||||
Time int64 `json:"time,omitempty"`
|
||||
Blocktime int64 `json:"blocktime"`
|
||||
ValueOut string `json:"valueOut"`
|
||||
ValueOutSat big.Int `json:"-"`
|
||||
ValueOut float64 `json:"valueOut"`
|
||||
ValueOutSat big.Int `json:"valueOutSat"`
|
||||
Size int `json:"size,omitempty"`
|
||||
ValueIn string `json:"valueIn"`
|
||||
ValueInSat big.Int `json:"-"`
|
||||
Fees string `json:"fees"`
|
||||
FeesSat big.Int `json:"-"`
|
||||
ValueIn float64 `json:"valueIn"`
|
||||
ValueInSat big.Int `json:"valueInSat"`
|
||||
Fees float64 `json:"fees"`
|
||||
FeesSat big.Int `json:"feesSat"`
|
||||
Hex string `json:"hex"`
|
||||
FloData string `json:"floData,omitempty"`
|
||||
}
|
||||
|
||||
// AddressV1 is used for legacy api v1
|
||||
type AddressV1 struct {
|
||||
Paging
|
||||
AddrStr string `json:"addrStr"`
|
||||
Balance string `json:"balance"`
|
||||
TotalReceived string `json:"totalReceived"`
|
||||
TotalSent string `json:"totalSent"`
|
||||
UnconfirmedBalance string `json:"unconfirmedBalance"`
|
||||
Balance float64 `json:"balance"`
|
||||
BalanceSat big.Int `json:"balanceSat"`
|
||||
TotalReceived float64 `json:"totalReceived"`
|
||||
TotalReceivedSat big.Int `json:"totalReceivedSat"`
|
||||
TotalSent float64 `json:"totalSent"`
|
||||
TotalSentSat big.Int `json:"totalSentSat"`
|
||||
UnconfirmedBalance float64 `json:"unconfirmedBalance"`
|
||||
UnconfirmedBalanceSat big.Int `json:"unconfirmedBalanceSat"`
|
||||
UnconfirmedTxApperances int `json:"unconfirmedTxApperances"`
|
||||
TxApperances int `json:"txApperances"`
|
||||
Transactions []*TxV1 `json:"txs,omitempty"`
|
||||
@ -88,7 +95,7 @@ type AddressV1 struct {
|
||||
type AddressUtxoV1 struct {
|
||||
Txid string `json:"txid"`
|
||||
Vout uint32 `json:"vout"`
|
||||
Amount string `json:"amount"`
|
||||
Amount float64 `json:"amount"`
|
||||
AmountSat big.Int `json:"satoshis"`
|
||||
Height int `json:"height,omitempty"`
|
||||
Confirmations int `json:"confirmations"`
|
||||
@ -102,6 +109,15 @@ type BlockV1 struct {
|
||||
Transactions []*TxV1 `json:"txs,omitempty"`
|
||||
}
|
||||
|
||||
type CoinSpecificDataV0 struct {
|
||||
FloData string
|
||||
}
|
||||
|
||||
func stringToFloat(f string) float64 {
|
||||
s, _ := strconv.ParseFloat(f, 64)
|
||||
return s
|
||||
}
|
||||
|
||||
// TxToV1 converts Tx to TxV1
|
||||
func (w *Worker) TxToV1(tx *Tx) *TxV1 {
|
||||
d := w.chainParser.AmountDecimals()
|
||||
@ -119,9 +135,10 @@ func (w *Worker) TxToV1(tx *Tx) *TxV1 {
|
||||
IsAddress: v.IsAddress,
|
||||
Sequence: v.Sequence,
|
||||
Txid: v.Txid,
|
||||
Value: v.ValueSat.DecimalString(d),
|
||||
Value: stringToFloat(v.ValueSat.DecimalString(d)),
|
||||
ValueSat: v.ValueSat.AsBigInt(),
|
||||
Vout: v.Vout,
|
||||
Coinbase: v.Coinbase,
|
||||
}
|
||||
}
|
||||
voutV1 := make([]VoutV1, len(tx.Vout))
|
||||
@ -141,29 +158,39 @@ func (w *Worker) TxToV1(tx *Tx) *TxV1 {
|
||||
SpentHeight: v.SpentHeight,
|
||||
SpentIndex: v.SpentIndex,
|
||||
SpentTxID: v.SpentTxID,
|
||||
Value: v.ValueSat.DecimalString(d),
|
||||
Value: stringToFloat(v.ValueSat.DecimalString(d)),
|
||||
ValueSat: v.ValueSat.AsBigInt(),
|
||||
}
|
||||
}
|
||||
|
||||
//floData
|
||||
var coinData CoinSpecificDataV0
|
||||
// Notice the dereferencing asterisk *
|
||||
err := json.Unmarshal(tx.CoinSpecificData, &coinData)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &TxV1{
|
||||
Blockhash: tx.Blockhash,
|
||||
Blockheight: tx.Blockheight,
|
||||
Blocktime: tx.Blocktime,
|
||||
Confirmations: tx.Confirmations,
|
||||
Fees: tx.FeesSat.DecimalString(d),
|
||||
Fees: stringToFloat(tx.FeesSat.DecimalString(d)),
|
||||
FeesSat: tx.FeesSat.AsBigInt(),
|
||||
Hex: tx.Hex,
|
||||
Locktime: tx.Locktime,
|
||||
Size: tx.Size,
|
||||
Time: tx.Blocktime,
|
||||
Txid: tx.Txid,
|
||||
ValueIn: tx.ValueInSat.DecimalString(d),
|
||||
ValueIn: stringToFloat(tx.ValueInSat.DecimalString(d)),
|
||||
ValueInSat: tx.ValueInSat.AsBigInt(),
|
||||
ValueOut: tx.ValueOutSat.DecimalString(d),
|
||||
ValueOut: stringToFloat(tx.ValueOutSat.DecimalString(d)),
|
||||
ValueOutSat: tx.ValueOutSat.AsBigInt(),
|
||||
Version: tx.Version,
|
||||
Vin: vinV1,
|
||||
Vout: voutV1,
|
||||
FloData: coinData.FloData, //(tx.CoinSpecificData).FloData
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,14 +207,18 @@ func (w *Worker) AddressToV1(a *Address) *AddressV1 {
|
||||
d := w.chainParser.AmountDecimals()
|
||||
return &AddressV1{
|
||||
AddrStr: a.AddrStr,
|
||||
Balance: a.BalanceSat.DecimalString(d),
|
||||
Balance: stringToFloat(a.BalanceSat.DecimalString(d)),
|
||||
BalanceSat: a.BalanceSat.AsBigInt(),
|
||||
Paging: a.Paging,
|
||||
TotalReceived: a.TotalReceivedSat.DecimalString(d),
|
||||
TotalSent: a.TotalSentSat.DecimalString(d),
|
||||
TotalReceived: stringToFloat(a.TotalReceivedSat.DecimalString(d)),
|
||||
TotalReceivedSat: a.TotalReceivedSat.AsBigInt(),
|
||||
TotalSent: stringToFloat(a.TotalSentSat.DecimalString(d)),
|
||||
TotalSentSat: a.TotalSentSat.AsBigInt(),
|
||||
Transactions: w.transactionsToV1(a.Transactions),
|
||||
TxApperances: a.Txs,
|
||||
Txids: a.Txids,
|
||||
UnconfirmedBalance: a.UnconfirmedBalanceSat.DecimalString(d),
|
||||
UnconfirmedBalance: stringToFloat(a.UnconfirmedBalanceSat.DecimalString(d)),
|
||||
UnconfirmedBalanceSat: a.UnconfirmedBalanceSat.AsBigInt(),
|
||||
UnconfirmedTxApperances: a.UnconfirmedTxs,
|
||||
}
|
||||
}
|
||||
@ -200,7 +231,7 @@ func (w *Worker) AddressUtxoToV1(au Utxos) []AddressUtxoV1 {
|
||||
utxo := &au[i]
|
||||
v1[i] = AddressUtxoV1{
|
||||
AmountSat: utxo.AmountSat.AsBigInt(),
|
||||
Amount: utxo.AmountSat.DecimalString(d),
|
||||
Amount: stringToFloat(utxo.AmountSat.DecimalString(d)),
|
||||
Confirmations: utxo.Confirmations,
|
||||
Height: utxo.Height,
|
||||
Txid: utxo.Txid,
|
||||
|
||||
@ -187,7 +187,7 @@ func (w *Worker) getAddressAliases(addresses map[string]struct{}) AddressAliases
|
||||
// GetTransaction reads transaction data from txid
|
||||
func (w *Worker) GetTransaction(txid string, spendingTxs bool, specificJSON bool) (*Tx, error) {
|
||||
addresses := w.newAddressesMapForAliases()
|
||||
tx, err := w.getTransaction(txid, spendingTxs, specificJSON, addresses)
|
||||
tx, err := w.getTransaction(txid, spendingTxs, /*specificJSON*/ true, addresses)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -1159,7 +1159,7 @@ func (w *Worker) txFromTxid(txid string, bestHeight uint32, option AccountDetail
|
||||
if ta == nil {
|
||||
glog.Warning("DB inconsistency: tx ", txid, ": not found in txAddresses")
|
||||
// as fallback, get tx from backend
|
||||
tx, err = w.getTransaction(txid, false, false, addresses)
|
||||
tx, err = w.getTransaction(txid, false, true, addresses)
|
||||
if err != nil {
|
||||
return nil, errors.Annotatef(err, "getTransaction %v", txid)
|
||||
}
|
||||
@ -1178,7 +1178,7 @@ func (w *Worker) txFromTxid(txid string, bestHeight uint32, option AccountDetail
|
||||
tx = w.txFromTxAddress(txid, ta, blockInfo, bestHeight, addresses)
|
||||
}
|
||||
} else {
|
||||
tx, err = w.getTransaction(txid, false, false, addresses)
|
||||
tx, err = w.getTransaction(txid, false, true, addresses)
|
||||
if err != nil {
|
||||
return nil, errors.Annotatef(err, "getTransaction %v", txid)
|
||||
}
|
||||
@ -1337,7 +1337,7 @@ func (w *Worker) GetAddress(address string, page int, txsOnPage int, option Acco
|
||||
if option == AccountDetailsTxidHistory {
|
||||
txids = append(txids, txid)
|
||||
} else {
|
||||
tx, err := w.txFromTxid(txid, bestheight, option, nil, addresses)
|
||||
tx, err := w.txFromTxid(txid, bestheight, AccountDetailsTxHistory, nil, addresses)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -2146,7 +2146,7 @@ func (w *Worker) GetBlock(bid string, page int, txsOnPage int) (*Block, error) {
|
||||
txi := 0
|
||||
addresses := w.newAddressesMapForAliases()
|
||||
for i := from; i < to; i++ {
|
||||
txs[txi], err = w.txFromTxid(bi.Txids[i], bestheight, AccountDetailsTxHistoryLight, dbi, addresses)
|
||||
txs[txi], err = w.txFromTxid(bi.Txids[i], bestheight, AccountDetailsTxHistory, dbi, addresses)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -113,6 +113,7 @@ func init() {
|
||||
BlockChainFactories["Firo"] = firo.NewFiroRPC
|
||||
BlockChainFactories["Fujicoin"] = fujicoin.NewFujicoinRPC
|
||||
BlockChainFactories["Flo"] = flo.NewFloRPC
|
||||
BlockChainFactories["Flo Testnet"] = flo.NewFloRPC
|
||||
BlockChainFactories["Bellcoin"] = bellcoin.NewBellcoinRPC
|
||||
BlockChainFactories["Qtum"] = qtum.NewQtumRPC
|
||||
BlockChainFactories["Viacoin"] = viacoin.NewViacoinRPC
|
||||
|
||||
@ -1,291 +0,0 @@
|
||||
//go:build unittest
|
||||
|
||||
package eth
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
"github.com/trezor/blockbook/tests/dbtestdata"
|
||||
)
|
||||
|
||||
func Test_contractGetTransfersFromLog(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
args []*bchain.RpcLog
|
||||
want bchain.TokenTransfers
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "ERC20 transfer 1",
|
||||
args: []*bchain.RpcLog{
|
||||
{
|
||||
Address: "0x76a45e8976499ab9ae223cc584019341d5a84e96",
|
||||
Topics: []string{
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
||||
"0x0000000000000000000000002aacf811ac1a60081ea39f7783c0d26c500871a8",
|
||||
"0x000000000000000000000000e9a5216ff992cfa01594d43501a56e12769eb9d2",
|
||||
},
|
||||
Data: "0x0000000000000000000000000000000000000000000000000000000000000123",
|
||||
},
|
||||
},
|
||||
want: bchain.TokenTransfers{
|
||||
{
|
||||
Contract: "0x76a45e8976499ab9ae223cc584019341d5a84e96",
|
||||
From: "0x2aacf811ac1a60081ea39f7783c0d26c500871a8",
|
||||
To: "0xe9a5216ff992cfa01594d43501a56e12769eb9d2",
|
||||
Value: *big.NewInt(0x123),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ERC20 transfer 2",
|
||||
args: []*bchain.RpcLog{
|
||||
{ // Transfer
|
||||
Address: "0x0d0f936ee4c93e25944694d6c121de94d9760f11",
|
||||
Topics: []string{
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
||||
"0x0000000000000000000000006f44cceb49b4a5812d54b6f494fc2febf25511ed",
|
||||
"0x0000000000000000000000004bda106325c335df99eab7fe363cac8a0ba2a24d",
|
||||
},
|
||||
Data: "0x0000000000000000000000000000000000000000000000006a8313d60b1f606b",
|
||||
},
|
||||
{ // Transfer
|
||||
Address: "0xc778417e063141139fce010982780140aa0cd5ab",
|
||||
Topics: []string{
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
||||
"0x0000000000000000000000004bda106325c335df99eab7fe363cac8a0ba2a24d",
|
||||
"0x0000000000000000000000006f44cceb49b4a5812d54b6f494fc2febf25511ed",
|
||||
},
|
||||
Data: "0x000000000000000000000000000000000000000000000000000308fd0e798ac0",
|
||||
},
|
||||
{ // not Transfer
|
||||
Address: "0x479cc461fecd078f766ecc58533d6f69580cf3ac",
|
||||
Topics: []string{
|
||||
"0x0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb3",
|
||||
"0x0000000000000000000000006f44cceb49b4a5812d54b6f494fc2febf25511ed",
|
||||
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"0x5af266c0a89a07c1917deaa024414577e6c3c31c8907d079e13eb448c082594f",
|
||||
},
|
||||
Data: "0x0000000000000000000000004bda106325c335df99eab7fe363cac8a0ba2a24d0000000000000",
|
||||
},
|
||||
{ // not Transfer
|
||||
Address: "0x0d0f936ee4c93e25944694d6c121de94d9760f11",
|
||||
Topics: []string{
|
||||
"0x0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb3",
|
||||
"0x0000000000000000000000007b62eb7fe80350dc7ec945c0b73242cb9877fb1b",
|
||||
"0xb0b69dad58df6032c3b266e19b1045b19c87acd2c06fb0c598090f44b8e263aa",
|
||||
},
|
||||
Data: "0x0000000000000000000000004bda106325c335df99eab7fe363cac8a0ba2a24d000000000000000000000000c778417e063141139fce010982780140aa0cd5ab0000000000000000000000000d0f936ee4c93e25944694d6c121de94d9760f1100000000000000000000000000000000000000000000000000031855667df7a80000000000000000000000000000000000000000000000006a8313d60b1f800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
},
|
||||
},
|
||||
want: bchain.TokenTransfers{
|
||||
{
|
||||
Contract: "0x0d0f936ee4c93e25944694d6c121de94d9760f11",
|
||||
From: "0x6f44cceb49b4a5812d54b6f494fc2febf25511ed",
|
||||
To: "0x4bda106325c335df99eab7fe363cac8a0ba2a24d",
|
||||
Value: *big.NewInt(0x6a8313d60b1f606b),
|
||||
},
|
||||
{
|
||||
Contract: "0xc778417e063141139fce010982780140aa0cd5ab",
|
||||
From: "0x4bda106325c335df99eab7fe363cac8a0ba2a24d",
|
||||
To: "0x6f44cceb49b4a5812d54b6f494fc2febf25511ed",
|
||||
Value: *big.NewInt(0x308fd0e798ac0),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ERC721 transfer 1",
|
||||
args: []*bchain.RpcLog{
|
||||
{ // Approval
|
||||
Address: "0x5689b918D34C038901870105A6C7fc24744D31eB",
|
||||
Topics: []string{
|
||||
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
|
||||
"0x0000000000000000000000000a206d4d5ff79cb5069def7fe3598421cff09391",
|
||||
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"0x0000000000000000000000000000000000000000000000000000000000001396",
|
||||
},
|
||||
Data: "0x",
|
||||
},
|
||||
{ // Transfer
|
||||
Address: "0x5689b918D34C038901870105A6C7fc24744D31eB",
|
||||
Topics: []string{
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
||||
"0x0000000000000000000000000a206d4d5ff79cb5069def7fe3598421cff09391",
|
||||
"0x0000000000000000000000006a016d7eec560549ffa0fbdb7f15c2b27302087f",
|
||||
"0x0000000000000000000000000000000000000000000000000000000000001396",
|
||||
},
|
||||
Data: "0x",
|
||||
},
|
||||
{ // OrdersMatched
|
||||
Address: "0x7Be8076f4EA4A4AD08075C2508e481d6C946D12b",
|
||||
Topics: []string{
|
||||
"0xc4109843e0b7d514e4c093114b863f8e7d8d9a458c372cd51bfe526b588006c9",
|
||||
"0x0000000000000000000000000a206d4d5ff79cb5069def7fe3598421cff09391",
|
||||
"0x0000000000000000000000006a016d7eec560549ffa0fbdb7f15c2b27302087f",
|
||||
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
},
|
||||
Data: "0x000000000000000000000000000000000000000000000000000000000000000069d3f0cc25f121f2aa96215f51ec4b4f1966f2d2ffbd3d8d8a45ad27b1c90323000000000000000000000000000000000000000000000000008e1bc9bf040000",
|
||||
},
|
||||
},
|
||||
want: bchain.TokenTransfers{
|
||||
{
|
||||
Type: bchain.NonFungibleToken,
|
||||
Contract: "0x5689b918D34C038901870105A6C7fc24744D31eB",
|
||||
From: "0x0a206d4d5ff79cb5069def7fe3598421cff09391",
|
||||
To: "0x6a016d7eec560549ffa0fbdb7f15c2b27302087f",
|
||||
Value: *big.NewInt(0x1396),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ERC1155 TransferSingle",
|
||||
args: []*bchain.RpcLog{
|
||||
{ // Transfer
|
||||
Address: "0x6Fd712E3A5B556654044608F9129040A4839E36c",
|
||||
Topics: []string{
|
||||
"0x5f9832c7244497a64c11c4a4f7597934bdf02b0361c54ad8e90091c2ce1f9e3c",
|
||||
},
|
||||
Data: "0x000000000000000000000000a3950b823cb063dd9afc0d27f35008b805b3ed530000000000000000000000004392faf3bb96b5694ecc6ef64726f61cdd4bb0ec000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001",
|
||||
},
|
||||
{ // TransferSingle
|
||||
Address: "0x6Fd712E3A5B556654044608F9129040A4839E36c",
|
||||
Topics: []string{
|
||||
"0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62",
|
||||
"0x0000000000000000000000009248a6048a58db9f0212dc7cd85ee8741128be72",
|
||||
"0x000000000000000000000000a3950b823cb063dd9afc0d27f35008b805b3ed53",
|
||||
"0x0000000000000000000000004392faf3bb96b5694ecc6ef64726f61cdd4bb0ec",
|
||||
},
|
||||
Data: "0x00000000000000000000000000000000000000000000000000000000000000960000000000000000000000000000000000000000000000000000000000000011",
|
||||
},
|
||||
{ // unknown
|
||||
Address: "0x9248A6048a58db9f0212dC7CD85eE8741128be72",
|
||||
Topics: []string{
|
||||
"0x0b7bef9468bee71526deef3cbbded0ec1a0aa3d5a3e81eaffb0e758552b33199",
|
||||
},
|
||||
Data: "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000a3950b823cb063dd9afc0d27f35008b805b3ed530000000000000000000000004392faf3bb96b5694ecc6ef64726f61cdd4bb0ec0000000000000000000000000000000000000000000000000000000000000001",
|
||||
},
|
||||
},
|
||||
want: bchain.TokenTransfers{
|
||||
{
|
||||
Type: bchain.MultiToken,
|
||||
Contract: "0x6Fd712E3A5B556654044608F9129040A4839E36c",
|
||||
From: "0xa3950b823cb063dd9afc0d27f35008b805b3ed53",
|
||||
To: "0x4392faf3bb96b5694ecc6ef64726f61cdd4bb0ec",
|
||||
MultiTokenValues: []bchain.MultiTokenValue{{Id: *big.NewInt(150), Value: *big.NewInt(0x11)}},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ERC1155 TransferBatch",
|
||||
args: []*bchain.RpcLog{
|
||||
{ // TransferBatch
|
||||
Address: "0x6c42C26a081c2F509F8bb68fb7Ac3062311cCfB7",
|
||||
Topics: []string{
|
||||
"0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb",
|
||||
"0x0000000000000000000000005dc6288b35e0807a3d6feb89b3a2ff4ab773168e",
|
||||
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"0x0000000000000000000000005dc6288b35e0807a3d6feb89b3a2ff4ab773168e",
|
||||
},
|
||||
Data: "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000006f0000000000000000000000000000000000000000000000000000000000000076a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a",
|
||||
},
|
||||
},
|
||||
want: bchain.TokenTransfers{
|
||||
{
|
||||
Type: bchain.MultiToken,
|
||||
Contract: "0x6c42c26a081c2f509f8bb68fb7ac3062311ccfb7",
|
||||
From: "0x0000000000000000000000000000000000000000",
|
||||
To: "0x5dc6288b35e0807a3d6feb89b3a2ff4ab773168e",
|
||||
MultiTokenValues: []bchain.MultiTokenValue{
|
||||
{Id: *big.NewInt(1776), Value: *big.NewInt(1)},
|
||||
{Id: *big.NewInt(1898), Value: *big.NewInt(10)},
|
||||
},
|
||||
},
|
||||
},
|
||||
}}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := contractGetTransfersFromLog(tt.args)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("contractGetTransfersFromLog error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if len(got) != len(tt.want) {
|
||||
t.Errorf("contractGetTransfersFromLog len not same, %+v, want %+v", got, tt.want)
|
||||
}
|
||||
for i := range got {
|
||||
// the addresses could have different case
|
||||
if strings.ToLower(fmt.Sprint(got[i])) != strings.ToLower(fmt.Sprint(tt.want[i])) {
|
||||
t.Errorf("contractGetTransfersFromLog %d = %+v, want %+v", i, got[i], tt.want[i])
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_contractGetTransfersFromTx(t *testing.T) {
|
||||
p := NewEthereumParser(1, false)
|
||||
b1 := dbtestdata.GetTestEthereumTypeBlock1(p)
|
||||
b2 := dbtestdata.GetTestEthereumTypeBlock2(p)
|
||||
bn, _ := new(big.Int).SetString("21e19e0c9bab2400000", 16)
|
||||
tests := []struct {
|
||||
name string
|
||||
args *bchain.RpcTransaction
|
||||
want bchain.TokenTransfers
|
||||
}{
|
||||
{
|
||||
name: "no contract transfer",
|
||||
args: (b1.Txs[0].CoinSpecificData.(bchain.EthereumSpecificData)).Tx,
|
||||
want: bchain.TokenTransfers{},
|
||||
},
|
||||
{
|
||||
name: "ERC20 transfer",
|
||||
args: (b1.Txs[1].CoinSpecificData.(bchain.EthereumSpecificData)).Tx,
|
||||
want: bchain.TokenTransfers{
|
||||
{
|
||||
Type: bchain.FungibleToken,
|
||||
Contract: "0x4af4114f73d1c1c903ac9e0361b379d1291808a2",
|
||||
From: "0x20cd153de35d469ba46127a0c8f18626b59a256a",
|
||||
To: "0x555ee11fbddc0e49a9bab358a8941ad95ffdb48f",
|
||||
Value: *bn,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ERC721 transferFrom",
|
||||
args: (b2.Txs[2].CoinSpecificData.(bchain.EthereumSpecificData)).Tx,
|
||||
want: bchain.TokenTransfers{
|
||||
{
|
||||
Type: bchain.NonFungibleToken,
|
||||
Contract: "0xcda9fc258358ecaa88845f19af595e908bb7efe9",
|
||||
From: "0x837e3f699d85a4b0b99894567e9233dfb1dcb081",
|
||||
To: "0x7b62eb7fe80350dc7ec945c0b73242cb9877fb1b",
|
||||
Value: *big.NewInt(1),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := contractGetTransfersFromTx(tt.args)
|
||||
if err != nil {
|
||||
t.Errorf("contractGetTransfersFromTx error = %v", err)
|
||||
return
|
||||
}
|
||||
if len(got) != len(tt.want) {
|
||||
t.Errorf("contractGetTransfersFromTx len not same, %+v, want %+v", got, tt.want)
|
||||
}
|
||||
for i := range got {
|
||||
// the addresses could have different case
|
||||
if strings.ToLower(fmt.Sprint(got[i])) != strings.ToLower(fmt.Sprint(tt.want[i])) {
|
||||
t.Errorf("contractGetTransfersFromTx %d = %+v, want %+v", i, got[i], tt.want[i])
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -1,496 +0,0 @@
|
||||
//go:build unittest
|
||||
|
||||
package eth
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
"github.com/trezor/blockbook/tests/dbtestdata"
|
||||
)
|
||||
|
||||
func TestEthParser_GetAddrDescFromAddress(t *testing.T) {
|
||||
type args struct {
|
||||
address string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "with 0x prefix",
|
||||
args: args{address: "0x81b7e08f65bdf5648606c89998a9cc8164397647"},
|
||||
want: "81b7e08f65bdf5648606c89998a9cc8164397647",
|
||||
},
|
||||
{
|
||||
name: "without 0x prefix",
|
||||
args: args{address: "47526228d673e9f079630d6cdaff5a2ed13e0e60"},
|
||||
want: "47526228d673e9f079630d6cdaff5a2ed13e0e60",
|
||||
},
|
||||
{
|
||||
name: "address of wrong length",
|
||||
args: args{address: "7526228d673e9f079630d6cdaff5a2ed13e0e60"},
|
||||
want: "",
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "ErrAddressMissing",
|
||||
args: args{address: ""},
|
||||
want: "",
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "error - not eth address",
|
||||
args: args{address: "1JKgN43B9SyLuZH19H5ECvr4KcfrbVHzZ6"},
|
||||
want: "",
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
p := NewEthereumParser(1, false)
|
||||
got, err := p.GetAddrDescFromAddress(tt.args.address)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("EthParser.GetAddrDescFromAddress() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
h := hex.EncodeToString(got)
|
||||
if !reflect.DeepEqual(h, tt.want) {
|
||||
t.Errorf("EthParser.GetAddrDescFromAddress() = %v, want %v", h, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var testTx1, testTx2, testTx1Failed, testTx1NoStatus bchain.Tx
|
||||
|
||||
func init() {
|
||||
|
||||
testTx1 = bchain.Tx{
|
||||
Blocktime: 1534858022,
|
||||
Time: 1534858022,
|
||||
Txid: "0xcd647151552b5132b2aef7c9be00dc6f73afc5901dde157aab131335baaa853b",
|
||||
Vin: []bchain.Vin{
|
||||
{
|
||||
Addresses: []string{"0x3E3a3D69dc66bA10737F531ed088954a9EC89d97"},
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
ValueSat: *big.NewInt(1999622000000000000),
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Addresses: []string{"0x555Ee11FBDDc0E49A9bAB358A8941AD95fFDB48f"},
|
||||
},
|
||||
},
|
||||
},
|
||||
CoinSpecificData: bchain.EthereumSpecificData{
|
||||
Tx: &bchain.RpcTransaction{
|
||||
AccountNonce: "0xb26c",
|
||||
GasPrice: "0x430e23400",
|
||||
GasLimit: "0x5208",
|
||||
To: "0x555Ee11FBDDc0E49A9bAB358A8941AD95fFDB48f",
|
||||
Value: "0x1bc0159d530e6000",
|
||||
Payload: "0x",
|
||||
Hash: "0xcd647151552b5132b2aef7c9be00dc6f73afc5901dde157aab131335baaa853b",
|
||||
BlockNumber: "0x41eee8",
|
||||
From: "0x3E3a3D69dc66bA10737F531ed088954a9EC89d97",
|
||||
TransactionIndex: "0xa",
|
||||
},
|
||||
Receipt: &bchain.RpcReceipt{
|
||||
GasUsed: "0x5208",
|
||||
Status: "0x1",
|
||||
Logs: []*bchain.RpcLog{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
testTx2 = bchain.Tx{
|
||||
Blocktime: 1534858022,
|
||||
Time: 1534858022,
|
||||
Txid: "0xa9cd088aba2131000da6f38a33c20169baee476218deea6b78720700b895b101",
|
||||
Vin: []bchain.Vin{
|
||||
{
|
||||
Addresses: []string{"0x20cD153de35D469BA46127A0C8F18626b59a256A"},
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
ValueSat: *big.NewInt(0),
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Addresses: []string{"0x4af4114F73d1c1C903aC9E0361b379D1291808A2"},
|
||||
},
|
||||
},
|
||||
},
|
||||
CoinSpecificData: bchain.EthereumSpecificData{
|
||||
Tx: &bchain.RpcTransaction{
|
||||
AccountNonce: "0xd0",
|
||||
GasPrice: "0x9502f9000",
|
||||
GasLimit: "0x130d5",
|
||||
To: "0x4af4114F73d1c1C903aC9E0361b379D1291808A2",
|
||||
Value: "0x0",
|
||||
Payload: "0xa9059cbb000000000000000000000000555ee11fbddc0e49a9bab358a8941ad95ffdb48f00000000000000000000000000000000000000000000021e19e0c9bab2400000",
|
||||
Hash: "0xa9cd088aba2131000da6f38a33c20169baee476218deea6b78720700b895b101",
|
||||
BlockNumber: "0x41eee8",
|
||||
From: "0x20cD153de35D469BA46127A0C8F18626b59a256A",
|
||||
TransactionIndex: "0x0"},
|
||||
Receipt: &bchain.RpcReceipt{
|
||||
GasUsed: "0xcb39",
|
||||
Status: "0x1",
|
||||
Logs: []*bchain.RpcLog{
|
||||
{
|
||||
Address: "0x4af4114F73d1c1C903aC9E0361b379D1291808A2",
|
||||
Data: "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000",
|
||||
Topics: []string{
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
||||
"0x00000000000000000000000020cd153de35d469ba46127a0c8f18626b59a256a",
|
||||
"0x000000000000000000000000555ee11fbddc0e49a9bab358a8941ad95ffdb48f",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
testTx1Failed = bchain.Tx{
|
||||
Blocktime: 1534858022,
|
||||
Time: 1534858022,
|
||||
Txid: "0xcd647151552b5132b2aef7c9be00dc6f73afc5901dde157aab131335baaa853b",
|
||||
Vin: []bchain.Vin{
|
||||
{
|
||||
Addresses: []string{"0x3E3a3D69dc66bA10737F531ed088954a9EC89d97"},
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
ValueSat: *big.NewInt(1999622000000000000),
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Addresses: []string{"0x555Ee11FBDDc0E49A9bAB358A8941AD95fFDB48f"},
|
||||
},
|
||||
},
|
||||
},
|
||||
CoinSpecificData: bchain.EthereumSpecificData{
|
||||
Tx: &bchain.RpcTransaction{
|
||||
AccountNonce: "0xb26c",
|
||||
GasPrice: "0x430e23400",
|
||||
GasLimit: "0x5208",
|
||||
To: "0x555Ee11FBDDc0E49A9bAB358A8941AD95fFDB48f",
|
||||
Value: "0x1bc0159d530e6000",
|
||||
Payload: "0x",
|
||||
Hash: "0xcd647151552b5132b2aef7c9be00dc6f73afc5901dde157aab131335baaa853b",
|
||||
BlockNumber: "0x41eee8",
|
||||
From: "0x3E3a3D69dc66bA10737F531ed088954a9EC89d97",
|
||||
TransactionIndex: "0xa",
|
||||
},
|
||||
Receipt: &bchain.RpcReceipt{
|
||||
GasUsed: "0x5208",
|
||||
Status: "0x0",
|
||||
Logs: []*bchain.RpcLog{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
testTx1NoStatus = bchain.Tx{
|
||||
Blocktime: 1534858022,
|
||||
Time: 1534858022,
|
||||
Txid: "0xcd647151552b5132b2aef7c9be00dc6f73afc5901dde157aab131335baaa853b",
|
||||
Vin: []bchain.Vin{
|
||||
{
|
||||
Addresses: []string{"0x3E3a3D69dc66bA10737F531ed088954a9EC89d97"},
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
ValueSat: *big.NewInt(1999622000000000000),
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Addresses: []string{"0x555Ee11FBDDc0E49A9bAB358A8941AD95fFDB48f"},
|
||||
},
|
||||
},
|
||||
},
|
||||
CoinSpecificData: bchain.EthereumSpecificData{
|
||||
Tx: &bchain.RpcTransaction{
|
||||
AccountNonce: "0xb26c",
|
||||
GasPrice: "0x430e23400",
|
||||
GasLimit: "0x5208",
|
||||
To: "0x555Ee11FBDDc0E49A9bAB358A8941AD95fFDB48f",
|
||||
Value: "0x1bc0159d530e6000",
|
||||
Payload: "0x",
|
||||
Hash: "0xcd647151552b5132b2aef7c9be00dc6f73afc5901dde157aab131335baaa853b",
|
||||
BlockNumber: "0x41eee8",
|
||||
From: "0x3E3a3D69dc66bA10737F531ed088954a9EC89d97",
|
||||
TransactionIndex: "0xa",
|
||||
},
|
||||
Receipt: &bchain.RpcReceipt{
|
||||
GasUsed: "0x5208",
|
||||
Status: "",
|
||||
Logs: []*bchain.RpcLog{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestEthereumParser_PackTx(t *testing.T) {
|
||||
type args struct {
|
||||
tx *bchain.Tx
|
||||
height uint32
|
||||
blockTime int64
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
p *EthereumParser
|
||||
args args
|
||||
want string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "1",
|
||||
args: args{
|
||||
tx: &testTx1,
|
||||
height: 4321000,
|
||||
blockTime: 1534858022,
|
||||
},
|
||||
want: dbtestdata.EthTx1Packed,
|
||||
},
|
||||
{
|
||||
name: "2",
|
||||
args: args{
|
||||
tx: &testTx2,
|
||||
height: 4321000,
|
||||
blockTime: 1534858022,
|
||||
},
|
||||
want: dbtestdata.EthTx2Packed,
|
||||
},
|
||||
{
|
||||
name: "3",
|
||||
args: args{
|
||||
tx: &testTx1Failed,
|
||||
height: 4321000,
|
||||
blockTime: 1534858022,
|
||||
},
|
||||
want: dbtestdata.EthTx1FailedPacked,
|
||||
},
|
||||
{
|
||||
name: "4",
|
||||
args: args{
|
||||
tx: &testTx1NoStatus,
|
||||
height: 4321000,
|
||||
blockTime: 1534858022,
|
||||
},
|
||||
want: dbtestdata.EthTx1NoStatusPacked,
|
||||
},
|
||||
}
|
||||
p := NewEthereumParser(1, false)
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := p.PackTx(tt.args.tx, tt.args.height, tt.args.blockTime)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("EthereumParser.PackTx() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
h := hex.EncodeToString(got)
|
||||
if !reflect.DeepEqual(h, tt.want) {
|
||||
t.Errorf("EthereumParser.PackTx() = %v, want %v", h, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestEthereumParser_UnpackTx(t *testing.T) {
|
||||
type args struct {
|
||||
hex string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
p *EthereumParser
|
||||
args args
|
||||
want *bchain.Tx
|
||||
want1 uint32
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "1",
|
||||
args: args{hex: dbtestdata.EthTx1Packed},
|
||||
want: &testTx1,
|
||||
want1: 4321000,
|
||||
},
|
||||
{
|
||||
name: "2",
|
||||
args: args{hex: dbtestdata.EthTx2Packed},
|
||||
want: &testTx2,
|
||||
want1: 4321000,
|
||||
},
|
||||
{
|
||||
name: "3",
|
||||
args: args{hex: dbtestdata.EthTx1FailedPacked},
|
||||
want: &testTx1Failed,
|
||||
want1: 4321000,
|
||||
},
|
||||
{
|
||||
name: "4",
|
||||
args: args{hex: dbtestdata.EthTx1NoStatusPacked},
|
||||
want: &testTx1NoStatus,
|
||||
want1: 4321000,
|
||||
},
|
||||
}
|
||||
p := NewEthereumParser(1, false)
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
b, err := hex.DecodeString(tt.args.hex)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
got, got1, err := p.UnpackTx(b)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("EthereumParser.UnpackTx() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
// DeepEqual has problems with pointers in completeTransaction
|
||||
gs := got.CoinSpecificData.(bchain.EthereumSpecificData)
|
||||
ws := tt.want.CoinSpecificData.(bchain.EthereumSpecificData)
|
||||
gc := *got
|
||||
wc := *tt.want
|
||||
gc.CoinSpecificData = nil
|
||||
wc.CoinSpecificData = nil
|
||||
if fmt.Sprint(gc) != fmt.Sprint(wc) {
|
||||
// if !reflect.DeepEqual(gc, wc) {
|
||||
t.Errorf("EthereumParser.UnpackTx() gc got = %+v, want %+v", gc, wc)
|
||||
}
|
||||
if !reflect.DeepEqual(gs.Tx, ws.Tx) {
|
||||
t.Errorf("EthereumParser.UnpackTx() gs.Tx got = %+v, want %+v", gs.Tx, ws.Tx)
|
||||
}
|
||||
if !reflect.DeepEqual(gs.Receipt, ws.Receipt) {
|
||||
t.Errorf("EthereumParser.UnpackTx() gs.Receipt got = %+v, want %+v", gs.Receipt, ws.Receipt)
|
||||
}
|
||||
if got1 != tt.want1 {
|
||||
t.Errorf("EthereumParser.UnpackTx() got1 = %v, want %v", got1, tt.want1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestEthereumParser_GetEthereumTxData(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
tx *bchain.Tx
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "Test empty data",
|
||||
tx: &testTx1,
|
||||
want: "0x",
|
||||
},
|
||||
{
|
||||
name: "Test non empty data",
|
||||
tx: &testTx2,
|
||||
want: "0xa9059cbb000000000000000000000000555ee11fbddc0e49a9bab358a8941ad95ffdb48f00000000000000000000000000000000000000000000021e19e0c9bab2400000",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := GetEthereumTxData(tt.tx)
|
||||
if got.Data != tt.want {
|
||||
t.Errorf("EthereumParser.GetEthereumTxData() = %v, want %v", got.Data, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestEthereumParser_ParseErrorFromOutput(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
output string
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "ParseErrorFromOutput 1",
|
||||
output: "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000031546f74616c206e756d626572206f662067726f757073206d7573742062652067726561746572207468616e207a65726f2e000000000000000000000000000000",
|
||||
want: "Total number of groups must be greater than zero.",
|
||||
},
|
||||
{
|
||||
name: "ParseErrorFromOutput 2",
|
||||
output: "0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000126e6f7420656e6f7567682062616c616e63650000000000000000000000000000",
|
||||
want: "not enough balance",
|
||||
},
|
||||
{
|
||||
name: "ParseErrorFromOutput empty",
|
||||
output: "",
|
||||
want: "",
|
||||
},
|
||||
{
|
||||
name: "ParseErrorFromOutput short",
|
||||
output: "0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000012",
|
||||
want: "",
|
||||
},
|
||||
{
|
||||
name: "ParseErrorFromOutput invalid signature",
|
||||
output: "0x08c379b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000126e6f7420656e6f7567682062616c616e63650000000000000000000000000000",
|
||||
want: "",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := ParseErrorFromOutput(tt.output)
|
||||
if got != tt.want {
|
||||
t.Errorf("EthereumParser.ParseErrorFromOutput() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestEthereumParser_PackInternalTransactionError_UnpackInternalTransactionError(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
original string
|
||||
packed string
|
||||
unpacked string
|
||||
}{
|
||||
{
|
||||
name: "execution reverted",
|
||||
original: "execution reverted",
|
||||
packed: "\x01",
|
||||
unpacked: "Reverted.",
|
||||
},
|
||||
{
|
||||
name: "out of gas",
|
||||
original: "out of gas",
|
||||
packed: "\x02",
|
||||
unpacked: "Out of gas.",
|
||||
},
|
||||
{
|
||||
name: "contract creation code storage out of gas",
|
||||
original: "contract creation code storage out of gas",
|
||||
packed: "\x03",
|
||||
unpacked: "Contract creation code storage out of gas.",
|
||||
},
|
||||
{
|
||||
name: "max code size exceeded",
|
||||
original: "max code size exceeded",
|
||||
packed: "\x04",
|
||||
unpacked: "Max code size exceeded.",
|
||||
},
|
||||
{
|
||||
name: "unknown error",
|
||||
original: "unknown error",
|
||||
packed: "unknown error",
|
||||
unpacked: "unknown error",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
packed := PackInternalTransactionError(tt.original)
|
||||
if packed != tt.packed {
|
||||
t.Errorf("EthereumParser.PackInternalTransactionError() = %v, want %v", packed, tt.packed)
|
||||
}
|
||||
unpacked := UnpackInternalTransactionError([]byte(packed))
|
||||
if unpacked != tt.unpacked {
|
||||
t.Errorf("EthereumParser.UnpackInternalTransactionError() = %v, want %v", unpacked, tt.unpacked)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
"exclude_files": [
|
||||
"bin/flo-qt"
|
||||
],
|
||||
"exec_command_template": "{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/bin/flod -datadir={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend -conf={{.Env.BackendInstallPath}}/{{.Coin.Alias}}/{{.Coin.Alias}}.conf -pid=/run/{{.Coin.Alias}}/{{.Coin.Alias}}.pid",
|
||||
"exec_command_template": "{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/bin/flod --testnet -datadir={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend -conf={{.Env.BackendInstallPath}}/{{.Coin.Alias}}/{{.Coin.Alias}}.conf -pid=/run/{{.Coin.Alias}}/{{.Coin.Alias}}.pid",
|
||||
"logrotate_files_template": "{{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend/*.log",
|
||||
"postinst_script_template": "",
|
||||
"service_type": "forking",
|
||||
|
||||
195
db/fiat_test.go
195
db/fiat_test.go
@ -1,195 +0,0 @@
|
||||
//go:build unittest
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/linxGnu/grocksdb"
|
||||
"github.com/trezor/blockbook/common"
|
||||
)
|
||||
|
||||
func TestRocksTickers(t *testing.T) {
|
||||
d := setupRocksDB(t, &testBitcoinParser{
|
||||
BitcoinParser: bitcoinTestnetParser(),
|
||||
})
|
||||
defer closeAndDestroyRocksDB(t, d)
|
||||
|
||||
// Test storing & finding tickers
|
||||
pastKey, _ := time.Parse(FiatRatesTimeFormat, "20190627000000")
|
||||
futureKey, _ := time.Parse(FiatRatesTimeFormat, "20190630000000")
|
||||
|
||||
ts1, _ := time.Parse(FiatRatesTimeFormat, "20190628000000")
|
||||
ticker1 := &common.CurrencyRatesTicker{
|
||||
Timestamp: ts1,
|
||||
Rates: map[string]float32{
|
||||
"usd": 20000,
|
||||
"eur": 18000,
|
||||
},
|
||||
TokenRates: map[string]float32{
|
||||
"0x6B175474E89094C44Da98b954EedeAC495271d0F": 17.2,
|
||||
},
|
||||
}
|
||||
|
||||
ts2, _ := time.Parse(FiatRatesTimeFormat, "20190629000000")
|
||||
ticker2 := &common.CurrencyRatesTicker{
|
||||
Timestamp: ts2,
|
||||
Rates: map[string]float32{
|
||||
"usd": 30000,
|
||||
},
|
||||
TokenRates: map[string]float32{
|
||||
"0x82dF128257A7d7556262E1AB7F1f639d9775B85E": 13.1,
|
||||
"0x6B175474E89094C44Da98b954EedeAC495271d0F": 17.5,
|
||||
},
|
||||
}
|
||||
|
||||
wb := grocksdb.NewWriteBatch()
|
||||
defer wb.Destroy()
|
||||
err := d.FiatRatesStoreTicker(wb, ticker1)
|
||||
if err != nil {
|
||||
t.Errorf("Error storing ticker! %v", err)
|
||||
}
|
||||
err = d.FiatRatesStoreTicker(wb, ticker2)
|
||||
if err != nil {
|
||||
t.Errorf("Error storing ticker! %v", err)
|
||||
}
|
||||
err = d.WriteBatch(wb)
|
||||
if err != nil {
|
||||
t.Errorf("Error storing ticker! %v", err)
|
||||
}
|
||||
|
||||
// test FiatRatesGetTicker with ticker that should be in DB
|
||||
t1, err := d.FiatRatesGetTicker(&ts1)
|
||||
if err != nil || t1 == nil {
|
||||
t.Fatalf("FiatRatesGetTicker t1 %v", err)
|
||||
}
|
||||
if !reflect.DeepEqual(t1, ticker1) {
|
||||
t.Fatalf("FiatRatesGetTicker(t1) = %v, want %v", *t1, *ticker1)
|
||||
}
|
||||
// test FiatRatesGetTicker with ticker that is not in DB
|
||||
t2, err := d.FiatRatesGetTicker(&pastKey)
|
||||
if err != nil || t2 != nil {
|
||||
t.Fatalf("FiatRatesGetTicker t2 %v, %v", err, t2)
|
||||
}
|
||||
|
||||
ticker, err := d.FiatRatesFindTicker(&pastKey, "", "") // should find the closest key (ticker1)
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker == nil {
|
||||
t.Errorf("Ticker not found")
|
||||
} else if ticker.Timestamp.Format(FiatRatesTimeFormat) != ticker1.Timestamp.Format(FiatRatesTimeFormat) {
|
||||
t.Errorf("Incorrect ticker found. Expected: %v, found: %+v", ticker1.Timestamp, ticker.Timestamp)
|
||||
}
|
||||
|
||||
ticker, err = d.FiatRatesFindLastTicker("", "") // should find the last key (ticker2)
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker == nil {
|
||||
t.Errorf("Ticker not found")
|
||||
} else if ticker.Timestamp.Format(FiatRatesTimeFormat) != ticker2.Timestamp.Format(FiatRatesTimeFormat) {
|
||||
t.Errorf("Incorrect ticker found. Expected: %v, found: %+v", ticker1.Timestamp, ticker.Timestamp)
|
||||
}
|
||||
|
||||
ticker, err = d.FiatRatesFindTicker(&futureKey, "", "") // should not find anything
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker != nil {
|
||||
t.Errorf("Ticker found, but the timestamp is older than the last ticker entry.")
|
||||
}
|
||||
|
||||
ticker, err = d.FiatRatesFindTicker(&pastKey, "", "0x6B175474E89094C44Da98b954EedeAC495271d0F") // should find the closest key (ticker1)
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker == nil {
|
||||
t.Errorf("Ticker not found")
|
||||
} else if ticker.Timestamp.Format(FiatRatesTimeFormat) != ticker1.Timestamp.Format(FiatRatesTimeFormat) {
|
||||
t.Errorf("Incorrect ticker found. Expected: %v, found: %+v", ticker1.Timestamp, ticker.Timestamp)
|
||||
}
|
||||
|
||||
ticker, err = d.FiatRatesFindTicker(&pastKey, "", "0x82dF128257A7d7556262E1AB7F1f639d9775B85E") // should find the last key (ticker2)
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker == nil {
|
||||
t.Errorf("Ticker not found")
|
||||
} else if ticker.Timestamp.Format(FiatRatesTimeFormat) != ticker2.Timestamp.Format(FiatRatesTimeFormat) {
|
||||
t.Errorf("Incorrect ticker found. Expected: %v, found: %+v", ticker2.Timestamp, ticker.Timestamp)
|
||||
}
|
||||
|
||||
ticker, err = d.FiatRatesFindLastTicker("eur", "") // should find the closest key (ticker1)
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker == nil {
|
||||
t.Errorf("Ticker not found")
|
||||
} else if ticker.Timestamp.Format(FiatRatesTimeFormat) != ticker1.Timestamp.Format(FiatRatesTimeFormat) {
|
||||
t.Errorf("Incorrect ticker found. Expected: %v, found: %+v", ticker1.Timestamp, ticker.Timestamp)
|
||||
}
|
||||
|
||||
ticker, err = d.FiatRatesFindLastTicker("usd", "") // should find the last key (ticker2)
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker == nil {
|
||||
t.Errorf("Ticker not found")
|
||||
} else if ticker.Timestamp.Format(FiatRatesTimeFormat) != ticker2.Timestamp.Format(FiatRatesTimeFormat) {
|
||||
t.Errorf("Incorrect ticker found. Expected: %v, found: %+v", ticker2.Timestamp, ticker.Timestamp)
|
||||
}
|
||||
|
||||
ticker, err = d.FiatRatesFindLastTicker("aud", "") // should not find any key
|
||||
if err != nil {
|
||||
t.Errorf("TestRocksTickers err: %+v", err)
|
||||
} else if ticker != nil {
|
||||
t.Errorf("Ticker %v found unexpectedly for aud vsCurrency", ticker)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func Test_packUnpackCurrencyRatesTicker(t *testing.T) {
|
||||
type args struct {
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
data common.CurrencyRatesTicker
|
||||
}{
|
||||
{
|
||||
name: "empty",
|
||||
data: common.CurrencyRatesTicker{},
|
||||
},
|
||||
{
|
||||
name: "rates",
|
||||
data: common.CurrencyRatesTicker{
|
||||
Rates: map[string]float32{
|
||||
"usd": 2129.2341123,
|
||||
"eur": 1332.51234,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "rates&tokenrates",
|
||||
data: common.CurrencyRatesTicker{
|
||||
Rates: map[string]float32{
|
||||
"usd": 322129.987654321,
|
||||
"eur": 291332.12345678,
|
||||
},
|
||||
TokenRates: map[string]float32{
|
||||
"0x82dF128257A7d7556262E1AB7F1f639d9775B85E": 0.4092341123,
|
||||
"0x6B175474E89094C44Da98b954EedeAC495271d0F": 12.32323232323232,
|
||||
"0xdAC17F958D2ee523a2206206994597C13D831ec7": 1332421341235.51234,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
packed := packCurrencyRatesTicker(&tt.data)
|
||||
got, err := unpackCurrencyRatesTicker(packed)
|
||||
if err != nil {
|
||||
t.Errorf("unpackCurrencyRatesTicker() error = %v", err)
|
||||
return
|
||||
}
|
||||
if !reflect.DeepEqual(got, &tt.data) {
|
||||
t.Errorf("unpackCurrencyRatesTicker() = %v, want %v", *got, tt.data)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
1674
db/rocksdb_test.go
1674
db/rocksdb_test.go
File diff suppressed because it is too large
Load Diff
@ -1,250 +0,0 @@
|
||||
//go:build unittest
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func Test_formatInt64(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
n int64
|
||||
want template.HTML
|
||||
}{
|
||||
{"1", 1, "1"},
|
||||
{"13", 13, "13"},
|
||||
{"123", 123, "123"},
|
||||
{"1234", 1234, `1<span class="ns">234</span>`},
|
||||
{"91234", 91234, `91<span class="ns">234</span>`},
|
||||
{"891234", 891234, `891<span class="ns">234</span>`},
|
||||
{"7891234", 7891234, `7<span class="ns">891</span><span class="ns">234</span>`},
|
||||
{"67891234", 67891234, `67<span class="ns">891</span><span class="ns">234</span>`},
|
||||
{"567891234", 567891234, `567<span class="ns">891</span><span class="ns">234</span>`},
|
||||
{"4567891234", 4567891234, `4<span class="ns">567</span><span class="ns">891</span><span class="ns">234</span>`},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := formatInt64(tt.n); !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("formatInt64() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_formatTime(t *testing.T) {
|
||||
timeNow = fixedTimeNow
|
||||
tests := []struct {
|
||||
name string
|
||||
want template.HTML
|
||||
}{
|
||||
{
|
||||
name: "2020-12-23 15:16:17",
|
||||
want: `<span tt="2020-12-23 15:16:17">630 days 21 hours ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-08-23 11:12:13",
|
||||
want: `<span tt="2022-08-23 11:12:13">23 days 1 hour ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-14 11:12:13",
|
||||
want: `<span tt="2022-09-14 11:12:13">1 day 1 hour ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-14 14:12:13",
|
||||
want: `<span tt="2022-09-14 14:12:13">22 hours 31 mins ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-15 09:33:26",
|
||||
want: `<span tt="2022-09-15 09:33:26">3 hours 10 mins ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-15 12:23:56",
|
||||
want: `<span tt="2022-09-15 12:23:56">20 mins ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-15 12:24:07",
|
||||
want: `<span tt="2022-09-15 12:24:07">19 mins ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-15 12:43:21",
|
||||
want: `<span tt="2022-09-15 12:43:21">35 secs ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-15 12:43:56",
|
||||
want: `<span tt="2022-09-15 12:43:56">0 secs ago</span>`,
|
||||
},
|
||||
{
|
||||
name: "2022-09-16 12:43:56",
|
||||
want: `2022-09-16 12:43:56`,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
tm, _ := time.Parse("2006-01-02 15:04:05", tt.name)
|
||||
if got := timeSpan(&tm); !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("formatTime() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_appendAmountSpan(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
class string
|
||||
amount string
|
||||
shortcut string
|
||||
txDate string
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "prim-amt 1.23456789 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "1.23456789",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">1.<span class="amt-dec">234<span class="ns">567</span><span class="ns">89</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt 1432134.23456 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "1432134.23456",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">1<span class="nc">432</span><span class="nc">134</span>.<span class="amt-dec">234<span class="ns">56</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "sec-amt 1 EUR",
|
||||
class: "sec-amt",
|
||||
amount: "1",
|
||||
shortcut: "EUR",
|
||||
want: `<span class="sec-amt">1 EUR</span>`,
|
||||
},
|
||||
{
|
||||
name: "sec-amt -1 EUR",
|
||||
class: "sec-amt",
|
||||
amount: "-1",
|
||||
shortcut: "EUR",
|
||||
want: `<span class="sec-amt">-1 EUR</span>`,
|
||||
},
|
||||
{
|
||||
name: "sec-amt 432109.23 EUR",
|
||||
class: "sec-amt",
|
||||
amount: "432109.23",
|
||||
shortcut: "EUR",
|
||||
want: `<span class="sec-amt">432<span class="nc">109</span>.<span class="amt-dec">23</span> EUR</span>`,
|
||||
},
|
||||
{
|
||||
name: "sec-amt -432109.23 EUR",
|
||||
class: "sec-amt",
|
||||
amount: "-432109.23",
|
||||
shortcut: "EUR",
|
||||
want: `<span class="sec-amt">-432<span class="nc">109</span>.<span class="amt-dec">23</span> EUR</span>`,
|
||||
},
|
||||
{
|
||||
name: "sec-amt 43141.29 EUR",
|
||||
class: "sec-amt",
|
||||
amount: "43141.29",
|
||||
shortcut: "EUR",
|
||||
txDate: "2022-03-14",
|
||||
want: `<span class="sec-amt" tm="2022-03-14">43<span class="nc">141</span>.<span class="amt-dec">29</span> EUR</span>`,
|
||||
},
|
||||
{
|
||||
name: "sec-amt -43141.29 EUR",
|
||||
class: "sec-amt",
|
||||
amount: "-43141.29",
|
||||
shortcut: "EUR",
|
||||
txDate: "2022-03-14",
|
||||
want: `<span class="sec-amt" tm="2022-03-14">-43<span class="nc">141</span>.<span class="amt-dec">29</span> EUR</span>`,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
var rv strings.Builder
|
||||
appendAmountSpan(&rv, tt.class, tt.amount, tt.shortcut, tt.txDate)
|
||||
if got := rv.String(); !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("appendAmountSpan() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_appendAmountSpanBitcoinType(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
class string
|
||||
amount string
|
||||
shortcut string
|
||||
txDate string
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "prim-amt 1.23456789 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "1.23456789",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">1.<span class="amt-dec">23<span class="ns">456</span><span class="ns">789</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt 1432134.23456 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "1432134.23456",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">1<span class="nc">432</span><span class="nc">134</span>.<span class="amt-dec">23<span class="ns">456</span><span class="ns">000</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt 1 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "1",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">1.<span class="amt-dec">00<span class="ns">000</span><span class="ns">000</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt 0 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "0",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">0 BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt 34.2 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "34.2",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">34.<span class="amt-dec">20<span class="ns">000</span><span class="ns">000</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt -34.2345678 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "-34.2345678",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">-34.<span class="amt-dec">23<span class="ns">456</span><span class="ns">780</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt -1234.2345 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "-1234.2345",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">-1<span class="nc">234</span>.<span class="amt-dec">23<span class="ns">450</span><span class="ns">000</span></span> BTC</span>`,
|
||||
},
|
||||
{
|
||||
name: "prim-amt -123.23 BTC",
|
||||
class: "prim-amt",
|
||||
amount: "-123.23",
|
||||
shortcut: "BTC",
|
||||
want: `<span class="prim-amt">-123.<span class="amt-dec">23<span class="ns">000</span><span class="ns">000</span></span> BTC</span>`,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
var rv strings.Builder
|
||||
appendAmountSpanBitcoinType(&rv, tt.class, tt.amount, tt.shortcut, tt.txDate)
|
||||
if got := rv.String(); !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("appendAmountSpanBitcoinType() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ func NewPublicServer(binding string, certFiles string, db *db.RocksDB, chain bch
|
||||
serveMux.Handle(path+"favicon.ico", http.FileServer(http.Dir("./static/")))
|
||||
serveMux.Handle(path+"static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
|
||||
// default handler
|
||||
serveMux.HandleFunc(path, s.htmlTemplateHandler(s.explorerIndex))
|
||||
serveMux.HandleFunc(path, s.htmlTemplateHandler(s.explorerBlocks))
|
||||
// default API handler
|
||||
serveMux.HandleFunc(path+"api/", s.jsonHandler(s.apiIndex, apiV2))
|
||||
|
||||
@ -146,6 +146,7 @@ func (s *PublicServer) ConnectFullPublicInterface() {
|
||||
serveMux.Handle(path+"test-websocket.html", http.FileServer(http.Dir("./static/")))
|
||||
if s.internalExplorer {
|
||||
// internal explorer handlers
|
||||
serveMux.HandleFunc(path+"status", s.htmlTemplateHandler(s.explorerIndex))
|
||||
serveMux.HandleFunc(path+"tx/", s.htmlTemplateHandler(s.explorerTx))
|
||||
serveMux.HandleFunc(path+"address/", s.htmlTemplateHandler(s.explorerAddress))
|
||||
serveMux.HandleFunc(path+"xpub/", s.htmlTemplateHandler(s.explorerXpub))
|
||||
@ -306,6 +307,7 @@ func (s *PublicServer) jsonHandler(handler func(r *http.Request, apiVersion int)
|
||||
data = jsonError{"Internal server error", http.StatusInternalServerError}
|
||||
}
|
||||
}
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
if e, isError := data.(jsonError); isError {
|
||||
w.WriteHeader(e.HTTPStatus)
|
||||
@ -1274,6 +1276,7 @@ func (s *PublicServer) apiTxSpecific(r *http.Request, apiVersion int) (interface
|
||||
|
||||
func (s *PublicServer) apiAddress(r *http.Request, apiVersion int) (interface{}, error) {
|
||||
var addressParam string
|
||||
var err error
|
||||
i := strings.LastIndexByte(r.URL.Path, '/')
|
||||
if i > 0 {
|
||||
addressParam = r.URL.Path[i+1:]
|
||||
@ -1281,10 +1284,18 @@ func (s *PublicServer) apiAddress(r *http.Request, apiVersion int) (interface{},
|
||||
if len(addressParam) == 0 {
|
||||
return nil, api.NewAPIError("Missing address", true)
|
||||
}
|
||||
onlyConfirmed := false
|
||||
confirmed := r.URL.Query().Get("confirmed")
|
||||
if len(confirmed) > 0 {
|
||||
onlyConfirmed, err = strconv.ParseBool(confirmed)
|
||||
if err != nil {
|
||||
return nil, api.NewAPIError("Parameter 'confirmed' cannot be converted to boolean", true)
|
||||
}
|
||||
}
|
||||
var address *api.Address
|
||||
var err error
|
||||
s.metrics.ExplorerViews.With(common.Labels{"action": "api-address"}).Inc()
|
||||
page, pageSize, details, filter, _, _ := s.getAddressQueryParams(r, api.AccountDetailsTxidHistory, txsInAPI)
|
||||
filter.OnlyConfirmed = onlyConfirmed
|
||||
secondaryCoin := strings.ToLower(r.URL.Query().Get("secondary"))
|
||||
address, err = s.api.GetAddress(addressParam, page, pageSize, details, filter, secondaryCoin)
|
||||
if err == nil && apiVersion == apiV1 {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,444 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"os"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/juju/errors"
|
||||
"github.com/martinboehm/golang-socketio"
|
||||
"github.com/martinboehm/golang-socketio/transport"
|
||||
)
|
||||
|
||||
var (
|
||||
// verifier functionality
|
||||
verifylog = flag.String("verifylog", "", "path to logfile containing socket.io requests/responses")
|
||||
wsurl = flag.String("wsurl", "", "URL of socket.io interface to verify")
|
||||
newSocket = flag.Bool("newsocket", false, "Create new socket.io connection for each request")
|
||||
)
|
||||
|
||||
type verifyStats struct {
|
||||
Count int
|
||||
SuccessCount int
|
||||
TotalLogNs int64
|
||||
TotalBlockbookNs int64
|
||||
}
|
||||
|
||||
type logMessage struct {
|
||||
ID int `json:"id"`
|
||||
Et int64 `json:"et"`
|
||||
Res json.RawMessage `json:"res"`
|
||||
Req json.RawMessage `json:"req"`
|
||||
}
|
||||
|
||||
type logRequestResponse struct {
|
||||
Request, Response json.RawMessage
|
||||
LogElapsedTime int64
|
||||
}
|
||||
|
||||
func getStat(m string, stats map[string]*verifyStats) *verifyStats {
|
||||
s, ok := stats[m]
|
||||
if !ok {
|
||||
s = &verifyStats{}
|
||||
stats[m] = s
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func unmarshalResponses(t *testing.T, id int, lrs *logRequestResponse, bbResStr string, bbResponse interface{}, logResponse interface{}) error {
|
||||
err := json.Unmarshal([]byte(bbResStr), bbResponse)
|
||||
if err != nil {
|
||||
t.Log(id, ": error unmarshal BB request ", err)
|
||||
return err
|
||||
}
|
||||
err = json.Unmarshal([]byte(lrs.Response), logResponse)
|
||||
if err != nil {
|
||||
t.Log(id, ": error unmarshal log request ", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func getFullAddressHistory(addr []string, rr addrOpts, ws *gosocketio.Client) (*resultGetAddressHistory, error) {
|
||||
rr.From = 0
|
||||
rr.To = 100000000
|
||||
rq := map[string]interface{}{
|
||||
"method": "getAddressHistory",
|
||||
"params": []interface{}{
|
||||
addr,
|
||||
rr,
|
||||
},
|
||||
}
|
||||
rrq, err := json.Marshal(rq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res, err := ws.Ack("message", json.RawMessage(rrq), time.Second*30)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bbResponse := resultGetAddressHistory{}
|
||||
err = json.Unmarshal([]byte(res), &bbResponse)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &bbResponse, nil
|
||||
}
|
||||
|
||||
func equalTx(logTx resTx, bbTx resTx) error {
|
||||
if logTx.Hash != bbTx.Hash {
|
||||
return errors.Errorf("Different Hash bb: %v log: %v", bbTx.Hash, logTx.Hash)
|
||||
}
|
||||
if logTx.Hex != bbTx.Hex {
|
||||
return errors.Errorf("Different Hex bb: %v log: %v", bbTx.Hex, logTx.Hex)
|
||||
}
|
||||
if logTx.BlockTimestamp != bbTx.BlockTimestamp && logTx.BlockTimestamp != 0 {
|
||||
return errors.Errorf("Different BlockTimestamp bb: %v log: %v", bbTx.BlockTimestamp, logTx.BlockTimestamp)
|
||||
}
|
||||
if logTx.FeeSatoshis != bbTx.FeeSatoshis {
|
||||
return errors.Errorf("Different FeeSatoshis bb: %v log: %v", bbTx.FeeSatoshis, logTx.FeeSatoshis)
|
||||
}
|
||||
if logTx.Height != bbTx.Height && logTx.Height != -1 {
|
||||
return errors.Errorf("Different Height bb: %v log: %v", bbTx.Height, logTx.Height)
|
||||
}
|
||||
if logTx.InputSatoshis != bbTx.InputSatoshis {
|
||||
return errors.Errorf("Different InputSatoshis bb: %v log: %v", bbTx.InputSatoshis, logTx.InputSatoshis)
|
||||
}
|
||||
if logTx.Locktime != bbTx.Locktime {
|
||||
return errors.Errorf("Different Locktime bb: %v log: %v", bbTx.Locktime, logTx.Locktime)
|
||||
}
|
||||
if logTx.OutputSatoshis != bbTx.OutputSatoshis {
|
||||
return errors.Errorf("Different OutputSatoshis bb: %v log: %v", bbTx.OutputSatoshis, logTx.OutputSatoshis)
|
||||
}
|
||||
if logTx.Version != bbTx.Version {
|
||||
return errors.Errorf("Different Version bb: %v log: %v", bbTx.Version, logTx.Version)
|
||||
}
|
||||
if len(logTx.Inputs) != len(bbTx.Inputs) {
|
||||
return errors.Errorf("Different number of Inputs bb: %v log: %v", len(bbTx.Inputs), len(logTx.Inputs))
|
||||
}
|
||||
// blockbook parses bech addresses, it is ok for bitcore to return nil address and blockbook parsed address
|
||||
for i := range logTx.Inputs {
|
||||
if logTx.Inputs[i].Satoshis != bbTx.Inputs[i].Satoshis ||
|
||||
(bbTx.Inputs[i].Address == nil && logTx.Inputs[i].Address != bbTx.Inputs[i].Address) ||
|
||||
(logTx.Inputs[i].Address != nil && *logTx.Inputs[i].Address != *bbTx.Inputs[i].Address) ||
|
||||
logTx.Inputs[i].OutputIndex != bbTx.Inputs[i].OutputIndex ||
|
||||
logTx.Inputs[i].Sequence != bbTx.Inputs[i].Sequence {
|
||||
return errors.Errorf("Different Inputs bb: %+v log: %+v", bbTx.Inputs, logTx.Inputs)
|
||||
}
|
||||
}
|
||||
if len(logTx.Outputs) != len(bbTx.Outputs) {
|
||||
return errors.Errorf("Different number of Outputs bb: %v log: %v", len(bbTx.Outputs), len(logTx.Outputs))
|
||||
}
|
||||
// blockbook parses bech addresses, it is ok for bitcore to return nil address and blockbook parsed address
|
||||
for i := range logTx.Outputs {
|
||||
if logTx.Outputs[i].Satoshis != bbTx.Outputs[i].Satoshis ||
|
||||
(bbTx.Outputs[i].Address == nil && logTx.Outputs[i].Address != bbTx.Outputs[i].Address) ||
|
||||
(logTx.Outputs[i].Address != nil && *logTx.Outputs[i].Address != *bbTx.Outputs[i].Address) {
|
||||
return errors.Errorf("Different Outputs bb: %+v log: %+v", bbTx.Outputs, logTx.Outputs)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func equalAddressHistoryItem(logItem addressHistoryItem, bbItem addressHistoryItem) error {
|
||||
if err := equalTx(logItem.Tx, bbItem.Tx); err != nil {
|
||||
return err
|
||||
}
|
||||
if !reflect.DeepEqual(logItem.Addresses, bbItem.Addresses) {
|
||||
return errors.Errorf("Different Addresses bb: %v log: %v", bbItem.Addresses, logItem.Addresses)
|
||||
}
|
||||
if logItem.Satoshis != bbItem.Satoshis {
|
||||
return errors.Errorf("Different Satoshis bb: %v log: %v", bbItem.Satoshis, logItem.Satoshis)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func verifyGetAddressHistory(t *testing.T, id int, lrs *logRequestResponse, bbResStr string, stat *verifyStats, ws *gosocketio.Client, bbRequest map[string]json.RawMessage) {
|
||||
bbResponse := resultGetAddressHistory{}
|
||||
logResponse := resultGetAddressHistory{}
|
||||
var bbFullResponse *resultGetAddressHistory
|
||||
if err := unmarshalResponses(t, id, lrs, bbResStr, &bbResponse, &logResponse); err != nil {
|
||||
return
|
||||
}
|
||||
// parse request to check params
|
||||
addr, rr, err := unmarshalGetAddressRequest(bbRequest["params"])
|
||||
if err != nil {
|
||||
t.Log(id, ": getAddressHistory error unmarshal BB request ", err)
|
||||
return
|
||||
}
|
||||
// mempool transactions are not comparable
|
||||
if !rr.QueryMempoolOnly {
|
||||
if (logResponse.Result.TotalCount != bbResponse.Result.TotalCount) ||
|
||||
len(logResponse.Result.Items) != len(bbResponse.Result.Items) {
|
||||
t.Log("getAddressHistory", id, "mismatch bb:", bbResponse.Result.TotalCount, len(bbResponse.Result.Items),
|
||||
"log:", logResponse.Result.TotalCount, len(logResponse.Result.Items))
|
||||
return
|
||||
}
|
||||
if logResponse.Result.TotalCount > 0 {
|
||||
for i, logItem := range logResponse.Result.Items {
|
||||
bbItem := bbResponse.Result.Items[i]
|
||||
if err = equalAddressHistoryItem(logItem, bbItem); err != nil {
|
||||
// if multiple addresses are specified, BlockBook returns transactions in different order
|
||||
// which causes problems in paged responses
|
||||
// we have to get all transactions from blockbook and check that they are in the logged response
|
||||
var err1 error
|
||||
if bbFullResponse == nil {
|
||||
bbFullResponse, err1 = getFullAddressHistory(addr, rr, ws)
|
||||
if err1 != nil {
|
||||
t.Log("getFullAddressHistory error", err)
|
||||
return
|
||||
}
|
||||
if bbFullResponse.Result.TotalCount != logResponse.Result.TotalCount {
|
||||
t.Log("getFullAddressHistory count mismatch", bbFullResponse.Result.TotalCount, logResponse.Result.TotalCount)
|
||||
return
|
||||
}
|
||||
}
|
||||
found := false
|
||||
for _, bbFullItem := range bbFullResponse.Result.Items {
|
||||
err1 = equalAddressHistoryItem(logItem, bbFullItem)
|
||||
if err1 == nil {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
if err1.Error()[:14] != "Different Hash" {
|
||||
t.Log(err1)
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
t.Log("getAddressHistory", id, "addresses", addr, "mismatch ", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stat.SuccessCount++
|
||||
}
|
||||
|
||||
func verifyGetInfo(t *testing.T, id int, lrs *logRequestResponse, bbResStr string, stat *verifyStats) {
|
||||
bbResponse := resultGetInfo{}
|
||||
logResponse := resultGetInfo{}
|
||||
if err := unmarshalResponses(t, id, lrs, bbResStr, &bbResponse, &logResponse); err != nil {
|
||||
return
|
||||
}
|
||||
if logResponse.Result.Blocks <= bbResponse.Result.Blocks &&
|
||||
logResponse.Result.Testnet == bbResponse.Result.Testnet &&
|
||||
logResponse.Result.Network == bbResponse.Result.Network {
|
||||
stat.SuccessCount++
|
||||
} else {
|
||||
t.Log("getInfo", id, "mismatch bb:", bbResponse.Result.Blocks, bbResponse.Result.Testnet, bbResponse.Result.Network,
|
||||
"log:", logResponse.Result.Blocks, logResponse.Result.Testnet, logResponse.Result.Network)
|
||||
}
|
||||
}
|
||||
|
||||
func verifyGetBlockHeader(t *testing.T, id int, lrs *logRequestResponse, bbResStr string, stat *verifyStats) {
|
||||
bbResponse := resultGetBlockHeader{}
|
||||
logResponse := resultGetBlockHeader{}
|
||||
if err := unmarshalResponses(t, id, lrs, bbResStr, &bbResponse, &logResponse); err != nil {
|
||||
return
|
||||
}
|
||||
if logResponse.Result.Hash == bbResponse.Result.Hash {
|
||||
stat.SuccessCount++
|
||||
} else {
|
||||
t.Log("getBlockHeader", id, "mismatch bb:", bbResponse.Result.Hash,
|
||||
"log:", logResponse.Result.Hash)
|
||||
}
|
||||
}
|
||||
|
||||
func verifyEstimateSmartFee(t *testing.T, id int, lrs *logRequestResponse, bbResStr string, stat *verifyStats) {
|
||||
bbResponse := resultEstimateSmartFee{}
|
||||
logResponse := resultEstimateSmartFee{}
|
||||
if err := unmarshalResponses(t, id, lrs, bbResStr, &bbResponse, &logResponse); err != nil {
|
||||
return
|
||||
}
|
||||
// it is not possible to compare fee directly, it changes over time,
|
||||
// verify that the BB fee is in a reasonable range
|
||||
if bbResponse.Result > 0 && bbResponse.Result < .1 {
|
||||
stat.SuccessCount++
|
||||
} else {
|
||||
t.Log("estimateSmartFee", id, "mismatch bb:", bbResponse.Result,
|
||||
"log:", logResponse.Result)
|
||||
}
|
||||
}
|
||||
|
||||
func verifySendTransaction(t *testing.T, id int, lrs *logRequestResponse, bbResStr string, stat *verifyStats) {
|
||||
bbResponse := resultSendTransaction{}
|
||||
logResponse := resultSendTransaction{}
|
||||
if err := unmarshalResponses(t, id, lrs, bbResStr, &bbResponse, &logResponse); err != nil {
|
||||
return
|
||||
}
|
||||
bbResponseError := resultError{}
|
||||
err := json.Unmarshal([]byte(bbResStr), &bbResponseError)
|
||||
if err != nil {
|
||||
t.Log(id, ": error unmarshal resultError ", err)
|
||||
return
|
||||
}
|
||||
// it is not possible to repeat sendTransaction, expect error
|
||||
if bbResponse.Result == "" && bbResponseError.Error.Message != "" {
|
||||
stat.SuccessCount++
|
||||
} else {
|
||||
t.Log("sendTransaction", id, "problem:", bbResponse.Result, bbResponseError)
|
||||
}
|
||||
}
|
||||
|
||||
func verifyGetDetailedTransaction(t *testing.T, id int, lrs *logRequestResponse, bbResStr string, stat *verifyStats) {
|
||||
bbResponse := resultGetDetailedTransaction{}
|
||||
logResponse := resultGetDetailedTransaction{}
|
||||
if err := unmarshalResponses(t, id, lrs, bbResStr, &bbResponse, &logResponse); err != nil {
|
||||
return
|
||||
}
|
||||
if err := equalTx(logResponse.Result, bbResponse.Result); err != nil {
|
||||
t.Log("getDetailedTransaction", id, err)
|
||||
return
|
||||
}
|
||||
stat.SuccessCount++
|
||||
}
|
||||
|
||||
func verifyMessage(t *testing.T, ws *gosocketio.Client, id int, lrs *logRequestResponse, stats map[string]*verifyStats) {
|
||||
req := make(map[string]json.RawMessage)
|
||||
err := json.Unmarshal(lrs.Request, &req)
|
||||
if err != nil {
|
||||
t.Log(id, ": error unmarshal request ", err)
|
||||
return
|
||||
}
|
||||
method := strings.Trim(string(req["method"]), "\"")
|
||||
if method == "" {
|
||||
t.Log(id, ": there is no method specified in request")
|
||||
return
|
||||
}
|
||||
// send the message to blockbook
|
||||
start := time.Now()
|
||||
res, err := ws.Ack("message", lrs.Request, time.Second*30)
|
||||
if err != nil {
|
||||
t.Log(id, ",", method, ": ws.Ack error ", err)
|
||||
getStat("ackError", stats).Count++
|
||||
return
|
||||
}
|
||||
ts := time.Since(start).Nanoseconds()
|
||||
stat := getStat(method, stats)
|
||||
stat.Count++
|
||||
stat.TotalLogNs += lrs.LogElapsedTime
|
||||
stat.TotalBlockbookNs += ts
|
||||
switch method {
|
||||
case "getAddressHistory":
|
||||
verifyGetAddressHistory(t, id, lrs, res, stat, ws, req)
|
||||
case "getBlockHeader":
|
||||
verifyGetBlockHeader(t, id, lrs, res, stat)
|
||||
case "getDetailedTransaction":
|
||||
verifyGetDetailedTransaction(t, id, lrs, res, stat)
|
||||
case "getInfo":
|
||||
verifyGetInfo(t, id, lrs, res, stat)
|
||||
case "estimateSmartFee":
|
||||
verifyEstimateSmartFee(t, id, lrs, res, stat)
|
||||
case "sendTransaction":
|
||||
verifySendTransaction(t, id, lrs, res, stat)
|
||||
// case "getAddressTxids":
|
||||
// case "estimateFee":
|
||||
// case "getMempoolEntry":
|
||||
default:
|
||||
t.Log(id, ",", method, ": unknown/unverified method", method)
|
||||
}
|
||||
}
|
||||
|
||||
func connectSocketIO(t *testing.T) *gosocketio.Client {
|
||||
tr := transport.GetDefaultWebsocketTransport()
|
||||
tr.WebsocketDialer = websocket.Dialer{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
}
|
||||
ws, err := gosocketio.Dial(*wsurl, tr)
|
||||
if err != nil {
|
||||
t.Fatal("Dial error ", err)
|
||||
return nil
|
||||
}
|
||||
return ws
|
||||
}
|
||||
|
||||
func Test_VerifyLog(t *testing.T) {
|
||||
if *verifylog == "" || *wsurl == "" {
|
||||
t.Skip("skipping test, flags verifylog or wsurl not specified")
|
||||
}
|
||||
t.Log("Verifying log", *verifylog, "against service", *wsurl)
|
||||
var ws *gosocketio.Client
|
||||
if !*newSocket {
|
||||
ws = connectSocketIO(t)
|
||||
defer ws.Close()
|
||||
}
|
||||
file, err := os.Open(*verifylog)
|
||||
if err != nil {
|
||||
t.Fatal("File read error", err)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
scanner := bufio.NewScanner(file)
|
||||
buf := make([]byte, 1<<25)
|
||||
scanner.Buffer(buf, 1<<25)
|
||||
scanner.Split(bufio.ScanLines)
|
||||
line := 0
|
||||
stats := make(map[string]*verifyStats)
|
||||
pairs := make(map[int]*logRequestResponse, 0)
|
||||
for scanner.Scan() {
|
||||
line++
|
||||
msg := logMessage{}
|
||||
err := json.Unmarshal(scanner.Bytes(), &msg)
|
||||
if err != nil {
|
||||
t.Log("Line ", line, ": json error ", err)
|
||||
continue
|
||||
}
|
||||
lrs, exists := pairs[msg.ID]
|
||||
if !exists {
|
||||
lrs = &logRequestResponse{}
|
||||
pairs[msg.ID] = lrs
|
||||
}
|
||||
if msg.Req != nil {
|
||||
if lrs.Request != nil {
|
||||
t.Log("Line ", line, ": duplicate request with id ", msg.ID)
|
||||
continue
|
||||
}
|
||||
lrs.Request = msg.Req
|
||||
} else if msg.Res != nil {
|
||||
if lrs.Response != nil {
|
||||
t.Log("Line ", line, ": duplicate response with id ", msg.ID)
|
||||
continue
|
||||
}
|
||||
lrs.Response = msg.Res
|
||||
lrs.LogElapsedTime = msg.Et
|
||||
}
|
||||
if lrs.Request != nil && lrs.Response != nil {
|
||||
if *newSocket {
|
||||
ws = connectSocketIO(t)
|
||||
}
|
||||
verifyMessage(t, ws, msg.ID, lrs, stats)
|
||||
if *newSocket {
|
||||
ws.Close()
|
||||
}
|
||||
delete(pairs, msg.ID)
|
||||
}
|
||||
}
|
||||
var keys []string
|
||||
for k := range stats {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
failures := 0
|
||||
sort.Strings(keys)
|
||||
t.Log("Processed", line, "lines")
|
||||
for _, k := range keys {
|
||||
s := stats[k]
|
||||
failures += s.Count - s.SuccessCount
|
||||
t.Log("Method:", k, "\tCount:", s.Count, "\tSuccess:", s.SuccessCount,
|
||||
"\tTime log:", s.TotalLogNs, "\tTime BB:", s.TotalBlockbookNs,
|
||||
"\tTime BB/log", float64(s.TotalBlockbookNs)/float64(s.TotalLogNs))
|
||||
}
|
||||
if failures != 0 {
|
||||
t.Error("Number of failures:", failures)
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 856 B |
@ -10,90 +10,161 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
|
||||
<script src="/static/js/main{{.Minified}}.js"></script>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="description" content="Trezor {{.CoinLabel}} Explorer">
|
||||
<title>Trezor {{.CoinLabel}} Explorer</title>
|
||||
<meta name="description" content="RanchiMall Blockbook">
|
||||
<title>RanchiMall Blockbook</title>
|
||||
<style>
|
||||
.icon{
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
fill: var(--bs-body-color);
|
||||
}
|
||||
header{
|
||||
width: 100vw;
|
||||
}
|
||||
header nav{
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
max-width: 84rem;
|
||||
margin: auto;
|
||||
align-items: center;
|
||||
padding: 1rem max(1rem, 2vw);
|
||||
grid-template-columns: 1fr auto;
|
||||
grid-template-areas: 'brand send' 'search search';
|
||||
}
|
||||
header .nav-link {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
.navbar-brand{
|
||||
grid-area: brand;
|
||||
}
|
||||
.navbar-brand .icon{
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
#search{
|
||||
grid-area: search;
|
||||
width: 100%;
|
||||
max-width: 32rem;
|
||||
margin: auto;
|
||||
}
|
||||
#search input{
|
||||
border-radius: 0.5rem 0 0 0.5rem;
|
||||
}
|
||||
#search button{
|
||||
border-radius: 0 0.5rem 0.5rem 0;
|
||||
}
|
||||
input::placeholder {
|
||||
color: #757575 !important;
|
||||
}
|
||||
.nav-link {
|
||||
grid-area: send;
|
||||
display: initial;
|
||||
}
|
||||
#wrap{
|
||||
padding: max(1rem, 2vw);
|
||||
padding-top: 2.5rem;
|
||||
max-width: 84rem;
|
||||
margin: 0 auto;
|
||||
margin-top: 8rem;
|
||||
}
|
||||
.info-table tr>td:first-child{
|
||||
white-space: nowrap
|
||||
}
|
||||
td.ellipsis{
|
||||
max-width: 50vw;
|
||||
}
|
||||
@media (min-width: 720px) {
|
||||
header nav{
|
||||
grid-template-columns: auto 1fr auto;
|
||||
grid-template-areas: 'brand search send';
|
||||
}
|
||||
#wrap{
|
||||
margin-top: 4rem;
|
||||
}
|
||||
td.ellipsis{
|
||||
max-width: 280px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header id="header">
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/" title="Home">
|
||||
<span class="trezor-logo"></span>
|
||||
<span style="padding-left: 140px;">{{.CoinLabel}} Explorer</span>
|
||||
</a>
|
||||
{{if .InternalExplorer}}
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav m-md-auto">
|
||||
<li class="nav-item pe-xl-4">
|
||||
<a href="/blocks" class="nav-link">Blocks</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/" class="nav-link">Status</a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="navbar-form">
|
||||
<form class="d-flex" id="search" action="/search" method="get">
|
||||
<input name="q" type="text" class="form-control form-control-lg" placeholder="Search for block, transaction, address or xpub" focus="true">
|
||||
<button class="btn" type="submit">
|
||||
<span class="search-icon"></span>
|
||||
</button>
|
||||
</form>
|
||||
<nav>
|
||||
<a class="navbar-brand d-flex align-items-center" style="font-weight: 500; gap: 0.3rem;" href="/" title="Home">
|
||||
<svg class="icon" viewBox="0 0 96 108" xml:space="preserve">
|
||||
<path d="M90.2,102.5c-2.4-8.2-9.9-14.5-27.4-23.1c-7.1-3.5-11.8-6.2-14-8.3c-1.7-1.6-3.5-4-4.2-5.5c-0.7-1.7-0.7-5.5,0-7.5
|
||||
c1.3-3.6,2.6-5.2,12.9-15.1c6.2-5.9,9.3-10.3,11.1-15.5c0.7-2.1,0.8-7.6,0.2-9.4C66.5,12,61.7,6.7,53.7,1.6c-3-1.9-4.3-2.1-4.3-0.8
|
||||
c0,0.3-0.5,1.4-1,2.4l-1,1.8l-2.8-1.9c-1.5-1.1-3.4-2.2-4.1-2.6c-1.3-0.7-2.4-0.6-2.4,0.2c0,0.3-1.4,3.4-2,4.4
|
||||
c0,0.1-0.4-0.1-0.9-0.4c-6.1-4.4-8.7-5.5-8.7-3.9c0,0.7-1.8,4.2-4,7.9C16,19.5,9.4,24.9,2.6,24.9c-3,0-2.9-0.1-2,3.4
|
||||
c0.7,2.8,1.1,3.1,3.6,2.3c2.3-0.7,3.9-1.5,5.8-2.9c0.8-0.6,1.5-0.9,1.6-0.9c0.1,0.1,0.5,1,0.7,2.1s0.7,2,0.9,2.1
|
||||
c0.8,0.3,5.1-1.3,7.5-2.9l2.3-1.5l0.5,1.8c0.6,2.4,1,2.7,3.3,2.1c3.9-1,7.7-3.7,11.5-8.2l2-2.4l-0.2,2.1c-0.6,5.4-4.3,11.4-11.3,18
|
||||
c-1.8,1.7-4.7,4.5-6.5,6.2c-10.7,10.2-10,18.6,2,26.5c2.7,1.8,10.3,5.8,15.3,8c0.9,0.4,3.3,1.7,5.3,2.9c11,6.5,16.4,13.1,16.4,19.7
|
||||
c0,1.3,0.1,2.4,0.2,2.6l0,0c0.3,0.3,0.1,0.3,3-0.5c1.4-0.4,2.6-0.9,2.8-1.1c0.4-0.6-0.6-3.7-1.8-6.1c-1.3-2.5-5.6-7-8.9-9.4
|
||||
c-3.8-2.8-9.3-5.9-17-9.7c-8.5-4.2-11.8-6.2-14.7-9.1c-2.6-2.6-3.9-5.3-3.9-8.2c0-4.6,2.3-8.6,8.3-14.1c9.4-8.7,13-13,15.5-18.8
|
||||
c1.3-3,1.4-3.4,1.4-6.7c0-3.1-0.1-3.8-1.1-6l-1.1-2.4l1-1.6c0.5-0.9,1.2-2.1,1.5-2.6l0.5-1l1.5,2.1c1.8,2.6,3.2,6.8,3.2,9.3
|
||||
c0,1.7-0.6,4.7-1.4,6.4c-0.2,0.4-0.4,1-0.5,1.3c-0.1,0.3-1.1,2-2.2,3.7c-2,3-5.2,6.4-13.4,14.2c-5.7,5.4-7.6,8.6-7.8,13.1
|
||||
c-0.2,3.7,0.7,5.9,3.7,9.2c3.2,3.4,6.9,5.8,17.4,11c12.1,6,17.3,9.6,21.3,14.5c2.5,3.2,3.7,5.8,3.9,9.3c0.1,1.6,0.3,3,0.5,3
|
||||
c0.1,0.1,0.8,0,1.4-0.2s1.9-0.5,2.7-0.7l1.5-0.4l-0.2-1.5c-0.7-5.1-5.4-10.8-13.1-16c-4.4-2.9-5.8-3.7-17.3-9.4
|
||||
c-5.7-2.8-9.2-5.1-11.8-7.6c-4.3-4.2-5.1-8.8-2.7-13.9c1.4-2.8,2.7-4.4,12.5-13.8c8-7.7,11.4-13.7,11.4-20.1c0-5.1-2.3-9.9-6.9-14.3
|
||||
c-1.1-1-2-2-2.1-2.2c-0.2-0.4,1.5-3.9,1.9-3.9c1.2,0,7.8,6.3,9.7,9.2c2,3.3,2.5,5,2.5,8.9c0,3.9-0.6,5.9-2.9,9.8
|
||||
c-2.4,4.1-4.2,6-14.2,15.5c-3.4,3.2-5.7,6.1-6.9,8.7c-0.9,2-1.1,2.7-1.1,5.1c0,2.3,0.2,3.2,1,4.9c1.9,4,7.4,8.5,15.4,12.4
|
||||
c12.5,6.1,15.1,7.6,19.4,10.7c7.2,5.3,10.6,10.5,10.6,16c0,1.3,0.1,2.4,0.3,2.5c0.4,0.3,4.8-0.8,5.5-1.3
|
||||
C90.7,104.4,90.7,104.3,90.2,102.5z M20.3,23.3L20.3,23.3c-2,1-3.3,1.4-4.8,1.5L13.3,25l2.3-2.8c3.7-4.5,6.4-8.9,10-16
|
||||
c0.9-1.8,1.8-3.5,2-3.6c0.4-0.4,2.6,1.1,5.1,3.4l2.1,1.9l-1.9,2.8C28.2,17.5,24.5,21.2,20.3,23.3z M39.3,17.4
|
||||
c-1.2,1.7-6.5,5.7-8.6,6.5v0c-1.1,0.4-2.8,0.8-3.9,0.9L24.9,25l2.1-2.6c2.5-3.1,5.1-7,7-10.4c0.7-1.4,1.4-2.5,1.5-2.6
|
||||
c0.3-0.4,1.7,1.4,3,4.1l1.5,3L39.3,17.4z M44.6,10c-0.7,1.2-1.4,2.1-1.5,2.1c-0.1,0-1.5-1.4-3-3l-2.8-3l0.6-1.5
|
||||
c1.1-2.6,1.3-2.7,3.4-1c1.9,1.5,4.5,3.8,4.5,4.1C45.8,7.8,45.3,8.9,44.6,10z"></path>
|
||||
</svg>
|
||||
<div class="d-flex flex-column">
|
||||
<span>
|
||||
RanchiMall
|
||||
</span>
|
||||
{{if .SecondaryCoin}}
|
||||
<div class="bb-group ms-lg-2 mt-2 mt-lg-0" role="group" aria-label="Currency switch">
|
||||
<input type="radio" class="btn-check" name="btnradio" id="primary-coin" autocomplete="off"{{if not .UseSecondaryCoin}} checked{{end}}>
|
||||
<label class="btn" for="primary-coin">{{.CoinShortcut}}</label>
|
||||
<input type="radio" class="btn-check" name="btnradio" id="secondary-coin" autocomplete="off"{{if .UseSecondaryCoin}} checked{{end}}>
|
||||
<label class="btn" for="secondary-coin">{{.SecondaryCoin}}</label>
|
||||
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"></button>
|
||||
<div class="dropdown-menu row">
|
||||
{{range $c := .SecondaryCurrencies}}
|
||||
<div class="col-3"><a href="?secondary={{$c}}&use_secondary=true">{{$c}}</a></div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<span class="fs-4" style="line-height: 1">
|
||||
Blockbook
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
{{if .InternalExplorer}}
|
||||
<form class="d-flex" id="search" action="/search" method="get">
|
||||
<input name="q" type="text" class="form-control form-control-lg" placeholder="Search for block, transaction, address or xpub" focus="true">
|
||||
<button class="btn btn-primary" type="submit" title="search">
|
||||
<svg class="icon" style="fill: var(--bs-body-bg)" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
|
||||
</button>
|
||||
</form>
|
||||
<a href="/sendtx" class="nav-link btn btn-light">Send</a>
|
||||
{{if .SecondaryCoin}}
|
||||
<div class="bb-group ms-lg-2 mt-2 mt-lg-0" role="group" aria-label="Currency switch">
|
||||
<input type="radio" class="btn-check" name="btnradio" id="primary-coin" autocomplete="off" {{if not .UseSecondaryCoin}} checked{{end}}>
|
||||
<label class="btn" for="primary-coin">{{.CoinShortcut}}</label>
|
||||
<input type="radio" class="btn-check" name="btnradio" id="secondary-coin" autocomplete="off" {{if .UseSecondaryCoin}} checked{{end}}>
|
||||
<label class="btn" for="secondary-coin">{{.SecondaryCoin}}</label>
|
||||
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"></button>
|
||||
<div class="dropdown-menu row">
|
||||
{{range $c := .SecondaryCurrencies}}
|
||||
<div class="col-3"><a href="?secondary={{$c}}&use_secondary=true">{{$c}}</a></div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</nav>
|
||||
</header>
|
||||
<main id="wrap">
|
||||
<div class="container">
|
||||
{{- template "specific" . -}}
|
||||
</div>
|
||||
{{- template "specific" . -}}
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<div class="container">
|
||||
<nav class="navbar navbar-dark">
|
||||
<span class="navbar-nav">
|
||||
<a class="nav-link" href="https://satoshilabs.com/" target="_blank" rel="noopener noreferrer">Created by SatoshiLabs</a>
|
||||
</span>
|
||||
<div>
|
||||
Created by <a class="nav-link" href="https://github.com/ranchimall/blockbook" target="_blank">RanchiMall</a> based on <a class="nav-link" href="https://github.com/trezor/blockbook" target="_blank">Trezor Blockbook</a>, and <a class="nav-link" href="https://github.com/bitspill/blockbook" target="_blank">@bitspill work</a>
|
||||
</div>
|
||||
<span class="navbar-nav ml-md-auto">
|
||||
<a class="nav-link" href="{{- .TOSLink -}}" target="_blank" rel="noopener noreferrer">Terms of Use</a>
|
||||
</span>
|
||||
<span class="navbar-nav ml-md-auto d-md-flex d-none">
|
||||
<a class="nav-link" href="https://trezor.io/" target="_blank" rel="noopener noreferrer">Trezor</a>
|
||||
</span>
|
||||
<span class="navbar-nav ml-md-auto d-md-flex d-none">
|
||||
<a class="nav-link" href="https://trezor.io/trezor-suite" target="_blank" rel="noopener noreferrer">Suite</a>
|
||||
</span>
|
||||
<span class="navbar-nav ml-md-auto d-md-flex d-none">
|
||||
<a class="nav-link" href="https://trezor.io/support" target="_blank" rel="noopener noreferrer">Support</a>
|
||||
</span>
|
||||
<span class="navbar-nav ml-md-auto">
|
||||
<a class="nav-link" href="/sendtx">Send Transaction</a>
|
||||
</span>
|
||||
<span class="navbar-nav ml-md-auto d-lg-flex d-none">
|
||||
<a class="nav-link" href="https://trezor.io/compare" target="_blank" rel="noopener noreferrer">Don't have a Trezor? Get one!</a>
|
||||
<a class="nav-link" href="/status">Status</a>
|
||||
</span>
|
||||
</nav>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -45,12 +45,12 @@
|
||||
<td class="ellipsis">{{$b.Version}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Merkle Root</td>
|
||||
<td style="max-width: 280px;" class="ellipsis">{{$b.MerkleRoot}}</td>
|
||||
<td>Merkle Root</td>
|
||||
<td class="ellipsis">{{$b.MerkleRoot}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nonce</td>
|
||||
<td style="max-width: 280px;" class="ellipsis">{{$b.Nonce}}</td>
|
||||
<td class="ellipsis">{{$b.Nonce}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bits</td>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6"><h1>Blocks</h1></div>
|
||||
<div class="col-md-6">{{if $blocks.Blocks}}{{template "paging" $data }}{{end}}</div>
|
||||
</row>
|
||||
</div>
|
||||
{{if $blocks.Blocks}}
|
||||
<div>
|
||||
<table class="table table-hover data-table">
|
||||
@ -12,7 +12,6 @@
|
||||
<th class="col-md-6">Hash</th>
|
||||
<th class="col-md-2">Timestamp</span></th>
|
||||
<th class="text-end">Transactions</th>
|
||||
<th class="text-end">Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -22,11 +21,10 @@
|
||||
<td class="ellipsis">{{$b.Hash}}</td>
|
||||
<td>{{unixTimeSpan $b.Time}}</td>
|
||||
<td class="text-end">{{formatUint32 $b.Txs}}</td>
|
||||
<td class="text-end">{{formatUint32 $b.Size}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{template "paging" $data }}
|
||||
{{end}}{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{{define "paging"}}{{$data := .}}{{if $data.PrevPage}}
|
||||
<nav class="paging justify-content-end">
|
||||
<nav class="paging justify-content-end flex-wrap">
|
||||
<a class="btn btn-paging" href="?page={{$data.PrevPage}}{{$data.PageParams}}">Previous</a>
|
||||
{{if $data.PagingRange}}
|
||||
<div class="paging-group mx-2">
|
||||
@ -13,4 +13,4 @@
|
||||
{{end}}
|
||||
<a class="btn btn-paging" href="?page={{$data.NextPage}}{{$data.PageParams}}">Next</a>
|
||||
</nav>
|
||||
{{end}}{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
{{end}}
|
||||
<tr>
|
||||
<td>In Block</td>
|
||||
<td class="ellipsis" style="max-width: 280px">{{if $tx.Confirmations}}{{$tx.Blockhash}}{{else}}<span class="badge bg-danger">Unconfirmed</span>{{end}}</td>
|
||||
<td class="ellipsis">{{if $tx.Confirmations}}{{$tx.Blockhash}}{{else}}<span class="badge bg-danger">Unconfirmed</span>{{end}}</td>
|
||||
</tr>
|
||||
{{if $tx.Confirmations}}
|
||||
<tr>
|
||||
|
||||
@ -74,5 +74,19 @@
|
||||
{{amountSpan $tx.ValueOutSat $data "txvalue copyable"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column p-4 rounded-4" style="background-color: var(--bs-border-color); color: var(--bs-dark); ">
|
||||
<span class="fw-bold">FLO Data</span>
|
||||
<span class="fst-normal copyable"></span>
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
let _script = document.currentScript;
|
||||
let floData = ({{$tx.CoinSpecificData}}).floData;
|
||||
if(floData) {
|
||||
_script.previousElementSibling.textContent = floData;
|
||||
_script.remove();
|
||||
} else _script.parentElement.remove();
|
||||
})()
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@ -1,277 +0,0 @@
|
||||
package dbtestdata
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"math/big"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
)
|
||||
|
||||
// Txids, Xpubs and Addresses
|
||||
const (
|
||||
TxidB1T1 = "00b2c06055e5e90e9c82bd4181fde310104391a7fa4f289b1704e5d90caa3840"
|
||||
TxidB1T2 = "effd9ef509383d536b1c8af5bf434c8efbf521a4f2befd4022bbd68694b4ac75"
|
||||
TxidB2T1 = "7c3be24063f268aaa1ed81b64776798f56088757641a34fb156c4f51ed2e9d25"
|
||||
TxidB2T2 = "3d90d15ed026dc45e19ffb52875ed18fa9e8012ad123d7f7212176e2b0ebdb71"
|
||||
TxidB2T3 = "05e2e48aeabdd9b75def7b48d756ba304713c2aba7b522bf9dbc893fc4231b07"
|
||||
TxidB2T4 = "fdd824a780cbb718eeb766eb05d83fdefc793a27082cd5e67f856d69798cf7db"
|
||||
|
||||
Xpub = "upub5E1xjDmZ7Hhej6LPpS8duATdKXnRYui7bDYj6ehfFGzWDZtmCmQkZhc3Zb7kgRLtHWd16QFxyP86JKL3ShZEBFX88aciJ3xyocuyhZZ8g6q"
|
||||
TaprootDescriptor = "tr([5c9e228d/86'/1'/0']tpubDC88gkaZi5HvJGxGDNLADkvtdpni3mLmx6vr2KnXmWMG8zfkBRggsxHVBkUpgcwPe2KKpkyvTJCdXHb1UHEWE64vczyyPQfHr1skBcsRedN/{0,1}/*)#4rqwxvej"
|
||||
|
||||
Addr1 = "mfcWp7DB6NuaZsExybTTXpVgWz559Np4Ti" // 76a914010d39800f86122416e28f485029acf77507169288ac
|
||||
Addr2 = "mtGXQvBowMkBpnhLckhxhbwYK44Gs9eEtz" // 76a9148bdf0aa3c567aa5975c2e61321b8bebbe7293df688ac
|
||||
Addr3 = "mv9uLThosiEnGRbVPS7Vhyw6VssbVRsiAw" // 76a914a08eae93007f22668ab5e4a9c83c8cd1c325e3e088ac
|
||||
Addr4 = "2MzmAKayJmja784jyHvRUW1bXPget1csRRG" // a91452724c5178682f70e0ba31c6ec0633755a3b41d987, xpub m/49'/1'/33'/0/0
|
||||
Addr5 = "2NEVv9LJmAnY99W1pFoc5UJjVdypBqdnvu1" // a914e921fc4912a315078f370d959f2c4f7b6d2a683c87
|
||||
Addr6 = "mzB8cYrfRwFRFAGTDzV8LkUQy5BQicxGhX" // 76a914ccaaaf374e1b06cb83118453d102587b4273d09588ac
|
||||
Addr7 = "mtR97eM2HPWVM6c8FGLGcukgaHHQv7THoL" // 76a9148d802c045445df49613f6a70ddd2e48526f3701f88ac
|
||||
Addr8 = "2N6utyMZfPNUb1Bk8oz7p2JqJrXkq83gegu" // a91495e9fbe306449c991d314afe3c3567d5bf78efd287, xpub m/49'/1'/33'/1/3
|
||||
Addr9 = "mmJx9Y8ayz9h14yd9fgCW1bUKoEpkBAquP" // 76a9143f8ba3fda3ba7b69f5818086e12223c6dd25e3c888ac
|
||||
AddrA = "mzVznVsCHkVHX9UN8WPFASWUUHtxnNn4Jj" // 76a914d03c0d863d189b23b061a95ad32940b65837609f88ac
|
||||
|
||||
TxidB2T1Output3OpReturn = "6a072020f1686f6a20"
|
||||
)
|
||||
|
||||
// Amounts in satoshis
|
||||
var (
|
||||
SatZero = big.NewInt(0)
|
||||
SatB1T1A1 = big.NewInt(100000000)
|
||||
SatB1T1A2 = big.NewInt(12345)
|
||||
SatB1T1A2Double = big.NewInt(12345 * 2)
|
||||
SatB1T2A3 = big.NewInt(1234567890123)
|
||||
SatB1T2A4 = big.NewInt(1)
|
||||
SatB1T2A5 = big.NewInt(9876)
|
||||
SatB2T1A6 = big.NewInt(317283951061)
|
||||
SatB2T1A7 = big.NewInt(917283951061)
|
||||
SatB2T2A8 = big.NewInt(118641975500)
|
||||
SatB2T2A9 = big.NewInt(198641975500)
|
||||
SatB2T3A5 = big.NewInt(9000)
|
||||
SatB2T4AA = big.NewInt(1360030331)
|
||||
)
|
||||
|
||||
// AddressToPubKeyHex is a utility conversion function
|
||||
func AddressToPubKeyHex(addr string, parser bchain.BlockChainParser) string {
|
||||
if addr == "" {
|
||||
return ""
|
||||
}
|
||||
b, err := parser.GetAddrDescFromAddress(addr)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
}
|
||||
return hex.EncodeToString(b)
|
||||
}
|
||||
|
||||
// GetTestBitcoinTypeBlock1 returns block #1
|
||||
func GetTestBitcoinTypeBlock1(parser bchain.BlockChainParser) *bchain.Block {
|
||||
return &bchain.Block{
|
||||
BlockHeader: bchain.BlockHeader{
|
||||
Height: 225493,
|
||||
Hash: "0000000076fbbed90fd75b0e18856aa35baa984e9c9d444cf746ad85e94e2997",
|
||||
Size: 1234567,
|
||||
Time: 1521515026,
|
||||
Confirmations: 2,
|
||||
},
|
||||
Txs: []bchain.Tx{
|
||||
{
|
||||
Txid: TxidB1T1,
|
||||
Vin: []bchain.Vin{},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
N: 0,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr1, parser),
|
||||
},
|
||||
ValueSat: *SatB1T1A1,
|
||||
},
|
||||
{
|
||||
N: 1,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr2, parser),
|
||||
},
|
||||
ValueSat: *SatB1T1A2,
|
||||
},
|
||||
{
|
||||
N: 2,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr2, parser),
|
||||
},
|
||||
ValueSat: *SatB1T1A2,
|
||||
},
|
||||
},
|
||||
Blocktime: 1521515026,
|
||||
Time: 1521515026,
|
||||
Confirmations: 2,
|
||||
},
|
||||
{
|
||||
Txid: TxidB1T2,
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
N: 0,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr3, parser),
|
||||
},
|
||||
ValueSat: *SatB1T2A3,
|
||||
},
|
||||
{
|
||||
N: 1,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr4, parser),
|
||||
},
|
||||
ValueSat: *SatB1T2A4,
|
||||
},
|
||||
{
|
||||
N: 2,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr5, parser),
|
||||
},
|
||||
ValueSat: *SatB1T2A5,
|
||||
},
|
||||
},
|
||||
Blocktime: 1521515026,
|
||||
Time: 1521515026,
|
||||
Confirmations: 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// GetTestBitcoinTypeBlock2 returns block #2
|
||||
func GetTestBitcoinTypeBlock2(parser bchain.BlockChainParser) *bchain.Block {
|
||||
return &bchain.Block{
|
||||
BlockHeader: bchain.BlockHeader{
|
||||
Height: 225494,
|
||||
Hash: "00000000eb0443fd7dc4a1ed5c686a8e995057805f9a161d9a5a77a95e72b7b6",
|
||||
Size: 2345678,
|
||||
Time: 1521595678,
|
||||
Confirmations: 1,
|
||||
},
|
||||
Txs: []bchain.Tx{
|
||||
{
|
||||
Txid: TxidB2T1,
|
||||
Vin: []bchain.Vin{
|
||||
// addr3
|
||||
{
|
||||
Txid: TxidB1T2,
|
||||
Vout: 0,
|
||||
},
|
||||
// addr2
|
||||
{
|
||||
Txid: TxidB1T1,
|
||||
Vout: 1,
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
N: 0,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr6, parser),
|
||||
},
|
||||
ValueSat: *SatB2T1A6,
|
||||
},
|
||||
{
|
||||
N: 1,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr7, parser),
|
||||
},
|
||||
ValueSat: *SatB2T1A7,
|
||||
},
|
||||
{
|
||||
N: 2,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: TxidB2T1Output3OpReturn, // OP_RETURN script
|
||||
},
|
||||
ValueSat: *SatZero,
|
||||
},
|
||||
},
|
||||
Blocktime: 1521595678,
|
||||
Time: 1521595678,
|
||||
Confirmations: 1,
|
||||
},
|
||||
{
|
||||
Txid: TxidB2T2,
|
||||
Vin: []bchain.Vin{
|
||||
// spending an output in the same block - addr6
|
||||
{
|
||||
Txid: TxidB2T1,
|
||||
Vout: 0,
|
||||
},
|
||||
// spending an output in the previous block - addr4
|
||||
{
|
||||
Txid: TxidB1T2,
|
||||
Vout: 1,
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
N: 0,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr8, parser),
|
||||
},
|
||||
ValueSat: *SatB2T2A8,
|
||||
},
|
||||
{
|
||||
N: 1,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr9, parser),
|
||||
},
|
||||
ValueSat: *SatB2T2A9,
|
||||
},
|
||||
},
|
||||
Blocktime: 1521595678,
|
||||
Time: 1521595678,
|
||||
Confirmations: 1,
|
||||
},
|
||||
// transaction from the same address in the previous block
|
||||
{
|
||||
Txid: TxidB2T3,
|
||||
Vin: []bchain.Vin{
|
||||
// addr5
|
||||
{
|
||||
Txid: TxidB1T2,
|
||||
Vout: 2,
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
N: 0,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(Addr5, parser),
|
||||
},
|
||||
ValueSat: *SatB2T3A5,
|
||||
},
|
||||
},
|
||||
Blocktime: 1521595678,
|
||||
Time: 1521595678,
|
||||
Confirmations: 1,
|
||||
},
|
||||
// mining transaction
|
||||
{
|
||||
Txid: TxidB2T4,
|
||||
Vin: []bchain.Vin{
|
||||
{
|
||||
Coinbase: "03bf1e1504aede765b726567696f6e312f50726f6a65637420425443506f6f6c2f01000001bf7e000000000000",
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
N: 0,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: AddressToPubKeyHex(AddrA, parser),
|
||||
},
|
||||
ValueSat: *SatB2T4AA,
|
||||
},
|
||||
{
|
||||
N: 1,
|
||||
ScriptPubKey: bchain.ScriptPubKey{},
|
||||
ValueSat: *SatZero,
|
||||
},
|
||||
},
|
||||
Blocktime: 1521595678,
|
||||
Time: 1521595678,
|
||||
Confirmations: 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -1,219 +0,0 @@
|
||||
package dbtestdata
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"math/big"
|
||||
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
)
|
||||
|
||||
type fakeBlockChain struct {
|
||||
*bchain.BaseChain
|
||||
}
|
||||
|
||||
// NewFakeBlockChain returns mocked blockchain RPC interface used for tests
|
||||
func NewFakeBlockChain(parser bchain.BlockChainParser) (bchain.BlockChain, error) {
|
||||
return &fakeBlockChain{&bchain.BaseChain{Parser: parser}}, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) CreateMempool(chain bchain.BlockChain) (bchain.Mempool, error) {
|
||||
return bchain.NewMempoolBitcoinType(chain, 1, 1, 0, ""), nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) Initialize() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) InitializeMempool(addrDescForOutpoint bchain.AddrDescForOutpointFunc, onNewTxAddr bchain.OnNewTxAddrFunc, onNewTx bchain.OnNewTxFunc) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) Shutdown(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) IsTestnet() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetNetworkName() string {
|
||||
return "fakecoin"
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetCoinName() string {
|
||||
return "Fakecoin"
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetSubversion() string {
|
||||
return "/Fakecoin:0.0.1/"
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetChainInfo() (v *bchain.ChainInfo, err error) {
|
||||
return &bchain.ChainInfo{
|
||||
Chain: c.GetNetworkName(),
|
||||
Blocks: 2,
|
||||
Headers: 2,
|
||||
Bestblockhash: GetTestBitcoinTypeBlock2(c.Parser).BlockHeader.Hash,
|
||||
Version: "001001",
|
||||
Subversion: c.GetSubversion(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBestBlockHash() (v string, err error) {
|
||||
return GetTestBitcoinTypeBlock2(c.Parser).BlockHeader.Hash, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBestBlockHeight() (v uint32, err error) {
|
||||
return GetTestBitcoinTypeBlock2(c.Parser).BlockHeader.Height, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBlockHash(height uint32) (v string, err error) {
|
||||
b1 := GetTestBitcoinTypeBlock1(c.Parser)
|
||||
if height == b1.BlockHeader.Height {
|
||||
return b1.BlockHeader.Hash, nil
|
||||
}
|
||||
b2 := GetTestBitcoinTypeBlock2(c.Parser)
|
||||
if height == b2.BlockHeader.Height {
|
||||
return b2.BlockHeader.Hash, nil
|
||||
}
|
||||
return "", bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBlockHeader(hash string) (v *bchain.BlockHeader, err error) {
|
||||
b1 := GetTestBitcoinTypeBlock1(c.Parser)
|
||||
if hash == b1.BlockHeader.Hash {
|
||||
return &b1.BlockHeader, nil
|
||||
}
|
||||
b2 := GetTestBitcoinTypeBlock2(c.Parser)
|
||||
if hash == b2.BlockHeader.Hash {
|
||||
return &b2.BlockHeader, nil
|
||||
}
|
||||
return nil, bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBlock(hash string, height uint32) (v *bchain.Block, err error) {
|
||||
b1 := GetTestBitcoinTypeBlock1(c.Parser)
|
||||
if hash == b1.BlockHeader.Hash || height == b1.BlockHeader.Height {
|
||||
return b1, nil
|
||||
}
|
||||
b2 := GetTestBitcoinTypeBlock2(c.Parser)
|
||||
if hash == b2.BlockHeader.Hash || height == b2.BlockHeader.Height {
|
||||
return b2, nil
|
||||
}
|
||||
return nil, bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func getBlockInfo(b *bchain.Block) *bchain.BlockInfo {
|
||||
bi := &bchain.BlockInfo{
|
||||
BlockHeader: b.BlockHeader,
|
||||
}
|
||||
for _, tx := range b.Txs {
|
||||
bi.Txids = append(bi.Txids, tx.Txid)
|
||||
}
|
||||
return bi
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBlockInfo(hash string) (v *bchain.BlockInfo, err error) {
|
||||
b1 := GetTestBitcoinTypeBlock1(c.Parser)
|
||||
if hash == b1.BlockHeader.Hash {
|
||||
return getBlockInfo(b1), nil
|
||||
}
|
||||
b2 := GetTestBitcoinTypeBlock2(c.Parser)
|
||||
if hash == b2.BlockHeader.Hash {
|
||||
return getBlockInfo(b2), nil
|
||||
}
|
||||
return nil, bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func getTxInBlock(b *bchain.Block, txid string) *bchain.Tx {
|
||||
for _, tx := range b.Txs {
|
||||
if tx.Txid == txid {
|
||||
return &tx
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBlockRaw(hash string) (string, error) {
|
||||
return "00e0ff3fd42677a86f1515bafcf9802c1765e02226655a9b97fd44132602000000000000", nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetTransaction(txid string) (v *bchain.Tx, err error) {
|
||||
v = getTxInBlock(GetTestBitcoinTypeBlock1(c.Parser), txid)
|
||||
if v == nil {
|
||||
v = getTxInBlock(GetTestBitcoinTypeBlock2(c.Parser), txid)
|
||||
}
|
||||
if v != nil {
|
||||
return v, nil
|
||||
}
|
||||
return nil, bchain.ErrTxNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetTransactionSpecific(tx *bchain.Tx) (v json.RawMessage, err error) {
|
||||
// txSpecific extends Tx with an additional Size and Vsize info
|
||||
type txSpecific struct {
|
||||
*bchain.Tx
|
||||
Vsize int `json:"vsize,omitempty"`
|
||||
Size int `json:"size,omitempty"`
|
||||
}
|
||||
|
||||
tx, err = c.GetTransaction(tx.Txid)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
txS := txSpecific{Tx: tx}
|
||||
|
||||
if tx.Txid == "7c3be24063f268aaa1ed81b64776798f56088757641a34fb156c4f51ed2e9d25" {
|
||||
txS.Vsize = 206
|
||||
txS.Size = 376
|
||||
} else if tx.Txid == "fdd824a780cbb718eeb766eb05d83fdefc793a27082cd5e67f856d69798cf7db" {
|
||||
txS.Size = 300
|
||||
} else if tx.Txid == "05e2e48aeabdd9b75def7b48d756ba304713c2aba7b522bf9dbc893fc4231b07" {
|
||||
txS.Hex = "010000000001012720b597ef06045c935960342b0bbc45aab5fd5642017282f5110216caaa2364010000002322002069dae530beb09a05d46d0b2aee98645b15bb5d1e808a386b5ef0c48aed5531cbffffffff021ec403000000000017a914203c9dbd3ffbd1a790fc1609fb430efa5cbe516d87061523000000000017a91465dfc5c16e80b86b589df3f85dacd43f5c5b4a8f8704004730440220783e9349fc48f22aa0064acf32bc255eafa761eb9fa8f90a504986713c52dc3702206fc6a1a42f74ea0b416b35671770c0d26fc453668e6107edc271f11e629cda1001483045022100b82ef510c7eec61f39bee3e73a19df451fb8cca842b66bc94696d6a095dd8e96022071767bf8e4859de06cd5caf75e833e284328570ea1caa88bc93478a8d0fa9ac90147522103958c08660082c9ce90399ded0da7c3b39ed20a7767160f12428191e005aa42572102b1e6d8187f54d83d1ffd70508e24c5bd3603bccb2346d8c6677434169de8bc2652ae00000000"
|
||||
} else if tx.Txid == "3d90d15ed026dc45e19ffb52875ed18fa9e8012ad123d7f7212176e2b0ebdb71" {
|
||||
txS.Vsize = 400
|
||||
}
|
||||
|
||||
rm, err := json.Marshal(txS)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return json.RawMessage(rm), nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetTransactionForMempool(txid string) (v *bchain.Tx, err error) {
|
||||
return nil, errors.New("Not implemented")
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) EstimateSmartFee(blocks int, conservative bool) (v big.Int, err error) {
|
||||
if !conservative {
|
||||
v.SetInt64(int64(blocks)*100 - 1)
|
||||
} else {
|
||||
v.SetInt64(int64(blocks) * 100)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) EstimateFee(blocks int) (v big.Int, err error) {
|
||||
v.SetInt64(int64(blocks) * 200)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) SendRawTransaction(tx string) (v string, err error) {
|
||||
if tx == "123456" {
|
||||
return "9876", nil
|
||||
}
|
||||
return "", errors.New("Invalid data")
|
||||
}
|
||||
|
||||
// GetChainParser returns parser for the blockchain
|
||||
func (c *fakeBlockChain) GetChainParser() bchain.BlockChainParser {
|
||||
return c.Parser
|
||||
}
|
||||
|
||||
// GetMempoolTransactions returns transactions in mempool
|
||||
func (c *fakeBlockChain) GetMempoolTransactions() ([]string, error) {
|
||||
return nil, errors.New("Not implemented")
|
||||
}
|
||||
@ -1,140 +0,0 @@
|
||||
package dbtestdata
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"math/big"
|
||||
"strconv"
|
||||
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
)
|
||||
|
||||
type fakeBlockChainEthereumType struct {
|
||||
*fakeBlockChain
|
||||
}
|
||||
|
||||
// NewFakeBlockChainEthereumType returns mocked blockchain RPC interface used for tests
|
||||
func NewFakeBlockChainEthereumType(parser bchain.BlockChainParser) (bchain.BlockChain, error) {
|
||||
return &fakeBlockChainEthereumType{&fakeBlockChain{&bchain.BaseChain{Parser: parser}}}, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) CreateMempool(chain bchain.BlockChain) (bchain.Mempool, error) {
|
||||
return bchain.NewMempoolEthereumType(chain, 1, false), nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetChainInfo() (v *bchain.ChainInfo, err error) {
|
||||
return &bchain.ChainInfo{
|
||||
Chain: c.GetNetworkName(),
|
||||
Blocks: 2,
|
||||
Headers: 2,
|
||||
Bestblockhash: GetTestEthereumTypeBlock2(c.Parser).BlockHeader.Hash,
|
||||
Version: "001001",
|
||||
Subversion: c.GetSubversion(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetBestBlockHash() (v string, err error) {
|
||||
return GetTestEthereumTypeBlock2(c.Parser).BlockHeader.Hash, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetBestBlockHeight() (v uint32, err error) {
|
||||
return GetTestEthereumTypeBlock2(c.Parser).BlockHeader.Height, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetBlockHash(height uint32) (v string, err error) {
|
||||
b1 := GetTestEthereumTypeBlock1(c.Parser)
|
||||
if height == b1.BlockHeader.Height {
|
||||
return b1.BlockHeader.Hash, nil
|
||||
}
|
||||
b2 := GetTestEthereumTypeBlock2(c.Parser)
|
||||
if height == b2.BlockHeader.Height {
|
||||
return b2.BlockHeader.Hash, nil
|
||||
}
|
||||
return "", bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetBlockHeader(hash string) (v *bchain.BlockHeader, err error) {
|
||||
b1 := GetTestEthereumTypeBlock1(c.Parser)
|
||||
if hash == b1.BlockHeader.Hash {
|
||||
return &b1.BlockHeader, nil
|
||||
}
|
||||
b2 := GetTestEthereumTypeBlock2(c.Parser)
|
||||
if hash == b2.BlockHeader.Hash {
|
||||
return &b2.BlockHeader, nil
|
||||
}
|
||||
return nil, bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetBlock(hash string, height uint32) (v *bchain.Block, err error) {
|
||||
b1 := GetTestEthereumTypeBlock1(c.Parser)
|
||||
if hash == b1.BlockHeader.Hash || height == b1.BlockHeader.Height {
|
||||
return b1, nil
|
||||
}
|
||||
b2 := GetTestEthereumTypeBlock2(c.Parser)
|
||||
if hash == b2.BlockHeader.Hash || height == b2.BlockHeader.Height {
|
||||
return b2, nil
|
||||
}
|
||||
return nil, bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetBlockInfo(hash string) (v *bchain.BlockInfo, err error) {
|
||||
b1 := GetTestEthereumTypeBlock1(c.Parser)
|
||||
if hash == b1.BlockHeader.Hash {
|
||||
return getBlockInfo(b1), nil
|
||||
}
|
||||
b2 := GetTestEthereumTypeBlock2(c.Parser)
|
||||
if hash == b2.BlockHeader.Hash {
|
||||
return getBlockInfo(b2), nil
|
||||
}
|
||||
return nil, bchain.ErrBlockNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetTransaction(txid string) (v *bchain.Tx, err error) {
|
||||
v = getTxInBlock(GetTestEthereumTypeBlock1(c.Parser), txid)
|
||||
if v == nil {
|
||||
v = getTxInBlock(GetTestEthereumTypeBlock2(c.Parser), txid)
|
||||
}
|
||||
if v != nil {
|
||||
return v, nil
|
||||
}
|
||||
return nil, bchain.ErrTxNotFound
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetTransactionSpecific(tx *bchain.Tx) (v json.RawMessage, err error) {
|
||||
txS, _ := tx.CoinSpecificData.(bchain.EthereumSpecificData)
|
||||
|
||||
rm, err := json.Marshal(txS)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return json.RawMessage(rm), nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) EthereumTypeGetBalance(addrDesc bchain.AddressDescriptor) (*big.Int, error) {
|
||||
return big.NewInt(123450000 + int64(addrDesc[0])), nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) EthereumTypeGetNonce(addrDesc bchain.AddressDescriptor) (uint64, error) {
|
||||
return uint64(addrDesc[0]), nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChainEthereumType) GetContractInfo(contractDesc bchain.AddressDescriptor) (*bchain.ContractInfo, error) {
|
||||
addresses, _, _ := c.Parser.GetAddressesFromAddrDesc(contractDesc)
|
||||
return &bchain.ContractInfo{
|
||||
Type: bchain.ERC20TokenType,
|
||||
Contract: addresses[0],
|
||||
Name: "Contract " + strconv.Itoa(int(contractDesc[0])),
|
||||
Symbol: "S" + strconv.Itoa(int(contractDesc[0])),
|
||||
Decimals: 18,
|
||||
CreatedInBlock: 12345,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// EthereumTypeGetErc20ContractBalance returns simulated balance
|
||||
func (c *fakeBlockChainEthereumType) EthereumTypeGetErc20ContractBalance(addrDesc, contractDesc bchain.AddressDescriptor) (*big.Int, error) {
|
||||
return big.NewInt(1000000000 + int64(addrDesc[0])*1000 + int64(contractDesc[0])), nil
|
||||
}
|
||||
|
||||
// GetTokenURI returns URI derived from the input contractDesc
|
||||
func (c *fakeBlockChainEthereumType) GetTokenURI(contractDesc bchain.AddressDescriptor, tokenID *big.Int) (string, error) {
|
||||
return "https://ipfs.io/ipfs/" + contractDesc.String()[3:] + ".json", nil
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
// Package tests provides functions for loading and running integration tests
|
||||
package tests
|
||||
@ -1,198 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package tests
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/martinboehm/btcutil/chaincfg"
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
"github.com/trezor/blockbook/bchain/coins"
|
||||
build "github.com/trezor/blockbook/build/tools"
|
||||
"github.com/trezor/blockbook/tests/rpc"
|
||||
"github.com/trezor/blockbook/tests/sync"
|
||||
)
|
||||
|
||||
type TestFunc func(t *testing.T, coin string, chain bchain.BlockChain, mempool bchain.Mempool, testConfig json.RawMessage)
|
||||
|
||||
var integrationTests = map[string]TestFunc{
|
||||
"rpc": rpc.IntegrationTest,
|
||||
"sync": sync.IntegrationTest,
|
||||
}
|
||||
|
||||
var notConnectedError = errors.New("Not connected to backend server")
|
||||
|
||||
func runIntegrationTests(t *testing.T) {
|
||||
tests, err := loadTests("tests.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
keys := make([]string, 0, len(tests))
|
||||
for k := range tests {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
|
||||
for _, coin := range keys {
|
||||
cfg := tests[coin]
|
||||
name := getMatchableName(coin)
|
||||
t.Run(name, func(t *testing.T) { runTests(t, coin, cfg) })
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func loadTests(path string) (map[string]map[string]json.RawMessage, error) {
|
||||
b, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
v := make(map[string]map[string]json.RawMessage)
|
||||
err = json.Unmarshal(b, &v)
|
||||
return v, err
|
||||
}
|
||||
|
||||
func getMatchableName(coin string) string {
|
||||
if idx := strings.Index(coin, "_testnet"); idx != -1 {
|
||||
return coin[:idx] + "=test"
|
||||
} else {
|
||||
return coin + "=main"
|
||||
}
|
||||
}
|
||||
|
||||
func runTests(t *testing.T, coin string, cfg map[string]json.RawMessage) {
|
||||
if cfg == nil || len(cfg) == 0 {
|
||||
t.Skip("No tests to run")
|
||||
}
|
||||
defer chaincfg.ResetParams()
|
||||
|
||||
bc, m, err := makeBlockChain(coin)
|
||||
if err != nil {
|
||||
if err == notConnectedError {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Fatalf("Cannot init blockchain: %s", err)
|
||||
}
|
||||
|
||||
for test, c := range cfg {
|
||||
if fn, found := integrationTests[test]; found {
|
||||
t.Run(test, func(t *testing.T) { fn(t, coin, bc, m, c) })
|
||||
} else {
|
||||
t.Errorf("Test not found: %s", test)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func makeBlockChain(coin string) (bchain.BlockChain, bchain.Mempool, error) {
|
||||
c, err := build.LoadConfig("../configs", coin)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
outputDir, err := ioutil.TempDir("", "integration_test")
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer os.RemoveAll(outputDir)
|
||||
|
||||
err = build.GeneratePackageDefinitions(c, "../build/templates", outputDir)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadFile(filepath.Join(outputDir, "blockbook", "blockchaincfg.json"))
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
var cfg json.RawMessage
|
||||
err = json.Unmarshal(b, &cfg)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
coinName, err := getName(cfg)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return initBlockChain(coinName, cfg)
|
||||
}
|
||||
|
||||
func getName(raw json.RawMessage) (string, error) {
|
||||
var cfg map[string]interface{}
|
||||
err := json.Unmarshal(raw, &cfg)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if n, found := cfg["coin_name"]; found {
|
||||
switch n := n.(type) {
|
||||
case string:
|
||||
return n, nil
|
||||
default:
|
||||
return "", fmt.Errorf("Unexpected type of field `name`: %s", reflect.TypeOf(n))
|
||||
}
|
||||
} else {
|
||||
return "", errors.New("Missing field `name`")
|
||||
}
|
||||
}
|
||||
|
||||
func initBlockChain(coinName string, cfg json.RawMessage) (bchain.BlockChain, bchain.Mempool, error) {
|
||||
factory, found := coins.BlockChainFactories[coinName]
|
||||
if !found {
|
||||
return nil, nil, fmt.Errorf("Factory function not found")
|
||||
}
|
||||
|
||||
chain, err := factory(cfg, func(_ bchain.NotificationType) {})
|
||||
if err != nil {
|
||||
if isNetError(err) {
|
||||
return nil, nil, notConnectedError
|
||||
}
|
||||
return nil, nil, fmt.Errorf("Factory function failed: %s", err)
|
||||
}
|
||||
|
||||
for i := 0; ; i++ {
|
||||
err = chain.Initialize()
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
if isNetError(err) {
|
||||
return nil, nil, notConnectedError
|
||||
}
|
||||
// wait max 5 minutes for backend to startup
|
||||
if i > 5*60 {
|
||||
return nil, nil, fmt.Errorf("BlockChain initialization failed: %s", err)
|
||||
}
|
||||
time.Sleep(time.Millisecond * 1000)
|
||||
}
|
||||
|
||||
mempool, err := chain.CreateMempool(chain)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("Mempool creation failed: %s", err)
|
||||
}
|
||||
|
||||
err = chain.InitializeMempool(nil, nil, nil)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("Mempool initialization failed: %s", err)
|
||||
}
|
||||
|
||||
return chain, mempool, nil
|
||||
}
|
||||
|
||||
func isNetError(err error) bool {
|
||||
if _, ok := err.(net.Error); ok {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package tests
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIntegration(t *testing.T) {
|
||||
runIntegrationTests(t)
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
// Package rpc implements integration tests of blockchain RPC layer
|
||||
package rpc
|
||||
448
tests/rpc/rpc.go
448
tests/rpc/rpc.go
@ -1,448 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
mapset "github.com/deckarep/golang-set"
|
||||
"github.com/juju/errors"
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
)
|
||||
|
||||
var testMap = map[string]func(t *testing.T, th *TestHandler){
|
||||
"GetBlockHash": testGetBlockHash,
|
||||
"GetBlock": testGetBlock,
|
||||
"GetTransaction": testGetTransaction,
|
||||
"GetTransactionForMempool": testGetTransactionForMempool,
|
||||
"MempoolSync": testMempoolSync,
|
||||
"EstimateSmartFee": testEstimateSmartFee,
|
||||
"EstimateFee": testEstimateFee,
|
||||
"GetBestBlockHash": testGetBestBlockHash,
|
||||
"GetBestBlockHeight": testGetBestBlockHeight,
|
||||
"GetBlockHeader": testGetBlockHeader,
|
||||
}
|
||||
|
||||
type TestHandler struct {
|
||||
Chain bchain.BlockChain
|
||||
Mempool bchain.Mempool
|
||||
TestData *TestData
|
||||
}
|
||||
|
||||
type TestData struct {
|
||||
BlockHeight uint32 `json:"blockHeight"`
|
||||
BlockHash string `json:"blockHash"`
|
||||
BlockTime int64 `json:"blockTime"`
|
||||
BlockSize int `json:"blockSize"`
|
||||
BlockTxs []string `json:"blockTxs"`
|
||||
TxDetails map[string]*bchain.Tx `json:"txDetails"`
|
||||
}
|
||||
|
||||
func IntegrationTest(t *testing.T, coin string, chain bchain.BlockChain, mempool bchain.Mempool, testConfig json.RawMessage) {
|
||||
tests, err := getTests(testConfig)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed loading of test list: %s", err)
|
||||
}
|
||||
|
||||
parser := chain.GetChainParser()
|
||||
td, err := loadTestData(coin, parser)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed loading of test data: %s", err)
|
||||
}
|
||||
|
||||
h := TestHandler{
|
||||
Chain: chain,
|
||||
Mempool: mempool,
|
||||
TestData: td,
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
if f, found := testMap[test]; found {
|
||||
t.Run(test, func(t *testing.T) { f(t, &h) })
|
||||
} else {
|
||||
t.Errorf("%s: test not found", test)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getTests(cfg json.RawMessage) ([]string, error) {
|
||||
var v []string
|
||||
err := json.Unmarshal(cfg, &v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(v) == 0 {
|
||||
return nil, errors.New("No tests declared")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
func loadTestData(coin string, parser bchain.BlockChainParser) (*TestData, error) {
|
||||
path := filepath.Join("rpc/testdata", coin+".json")
|
||||
b, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var v TestData
|
||||
err = json.Unmarshal(b, &v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, tx := range v.TxDetails {
|
||||
// convert amounts in test json to bit.Int and clear the temporary JsonValue
|
||||
for i := range tx.Vout {
|
||||
vout := &tx.Vout[i]
|
||||
vout.ValueSat, err = parser.AmountToBigInt(vout.JsonValue)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
vout.JsonValue = ""
|
||||
}
|
||||
|
||||
// get addresses parsed
|
||||
err := setTxAddresses(parser, tx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return &v, nil
|
||||
}
|
||||
|
||||
func setTxAddresses(parser bchain.BlockChainParser, tx *bchain.Tx) error {
|
||||
for i := range tx.Vout {
|
||||
ad, err := parser.GetAddrDescFromVout(&tx.Vout[i])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
addrs := []string{}
|
||||
a, s, err := parser.GetAddressesFromAddrDesc(ad)
|
||||
if err == nil && s {
|
||||
addrs = append(addrs, a...)
|
||||
}
|
||||
tx.Vout[i].ScriptPubKey.Addresses = addrs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func testGetBlockHash(t *testing.T, h *TestHandler) {
|
||||
hash, err := h.Chain.GetBlockHash(h.TestData.BlockHeight)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
if hash != h.TestData.BlockHash {
|
||||
t.Errorf("GetBlockHash() got %q, want %q", hash, h.TestData.BlockHash)
|
||||
}
|
||||
}
|
||||
|
||||
func testGetBlock(t *testing.T, h *TestHandler) {
|
||||
blk, err := h.Chain.GetBlock(h.TestData.BlockHash, 0)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(blk.Txs) != len(h.TestData.BlockTxs) {
|
||||
t.Errorf("GetBlock() number of transactions: got %d, want %d", len(blk.Txs), len(h.TestData.BlockTxs))
|
||||
}
|
||||
|
||||
for ti, tx := range blk.Txs {
|
||||
if tx.Txid != h.TestData.BlockTxs[ti] {
|
||||
t.Errorf("GetBlock() transaction %d: got %s, want %s", ti, tx.Txid, h.TestData.BlockTxs[ti])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testGetTransaction(t *testing.T, h *TestHandler) {
|
||||
for txid, want := range h.TestData.TxDetails {
|
||||
got, err := h.Chain.GetTransaction(txid)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
// Confirmations is variable field, we just check if is set and reset it
|
||||
if got.Confirmations <= 0 {
|
||||
t.Errorf("GetTransaction() got struct with invalid Confirmations field")
|
||||
continue
|
||||
}
|
||||
got.Confirmations = 0
|
||||
// CoinSpecificData are not specified in the fixtures
|
||||
got.CoinSpecificData = nil
|
||||
|
||||
normalizeAddresses(want, h.Chain.GetChainParser())
|
||||
normalizeAddresses(got, h.Chain.GetChainParser())
|
||||
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Errorf("GetTransaction() got %+#v, want %+#v", got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testGetTransactionForMempool(t *testing.T, h *TestHandler) {
|
||||
for txid, want := range h.TestData.TxDetails {
|
||||
// reset fields that are not parsed by BlockChainParser
|
||||
want.Confirmations, want.Blocktime, want.Time, want.CoinSpecificData = 0, 0, 0, nil
|
||||
|
||||
got, err := h.Chain.GetTransactionForMempool(txid)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
normalizeAddresses(want, h.Chain.GetChainParser())
|
||||
normalizeAddresses(got, h.Chain.GetChainParser())
|
||||
|
||||
// transactions parsed from JSON may contain additional data
|
||||
got.Confirmations, got.Blocktime, got.Time, got.CoinSpecificData = 0, 0, 0, nil
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Errorf("GetTransactionForMempool() got %+#v, want %+#v", got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// empty slice can be either []slice{} or nil; reflect.DeepEqual treats them as different value
|
||||
// remove checksums from ethereum addresses
|
||||
func normalizeAddresses(tx *bchain.Tx, parser bchain.BlockChainParser) {
|
||||
for i := range tx.Vin {
|
||||
if len(tx.Vin[i].Addresses) == 0 {
|
||||
tx.Vin[i].Addresses = nil
|
||||
} else {
|
||||
if parser.GetChainType() == bchain.ChainEthereumType {
|
||||
for j := range tx.Vin[i].Addresses {
|
||||
tx.Vin[i].Addresses[j] = strings.ToLower(tx.Vin[i].Addresses[j])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for i := range tx.Vout {
|
||||
if len(tx.Vout[i].ScriptPubKey.Addresses) == 0 {
|
||||
tx.Vout[i].ScriptPubKey.Addresses = nil
|
||||
} else {
|
||||
if parser.GetChainType() == bchain.ChainEthereumType {
|
||||
for j := range tx.Vout[i].ScriptPubKey.Addresses {
|
||||
tx.Vout[i].ScriptPubKey.Addresses[j] = strings.ToLower(tx.Vout[i].ScriptPubKey.Addresses[j])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testMempoolSync(t *testing.T, h *TestHandler) {
|
||||
for i := 0; i < 3; i++ {
|
||||
txs := getMempool(t, h)
|
||||
|
||||
n, err := h.Mempool.Resync()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if n == 0 {
|
||||
// no transactions to test
|
||||
continue
|
||||
}
|
||||
|
||||
txs = intersect(txs, getMempool(t, h))
|
||||
if len(txs) == 0 {
|
||||
// no transactions to test
|
||||
continue
|
||||
}
|
||||
|
||||
txid2addrs := getTxid2addrs(t, h, txs)
|
||||
if len(txid2addrs) == 0 {
|
||||
t.Skip("Skipping test, no addresses in mempool")
|
||||
}
|
||||
|
||||
for txid, addrs := range txid2addrs {
|
||||
for _, a := range addrs {
|
||||
got, err := h.Mempool.GetTransactions(a)
|
||||
if err != nil {
|
||||
t.Fatalf("address %q: %s", a, err)
|
||||
}
|
||||
if !containsTx(got, txid) {
|
||||
t.Errorf("ResyncMempool() - for address %s, transaction %s wasn't found in mempool", a, txid)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// done
|
||||
return
|
||||
}
|
||||
t.Skip("Skipping test, all attempts to sync mempool failed due to network state changes")
|
||||
}
|
||||
|
||||
func testEstimateSmartFee(t *testing.T, h *TestHandler) {
|
||||
for _, blocks := range []int{1, 2, 3, 5, 10} {
|
||||
fee, err := h.Chain.EstimateSmartFee(blocks, true)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if fee.Sign() == -1 {
|
||||
sf := h.Chain.GetChainParser().AmountToDecimalString(&fee)
|
||||
if sf != "-1" {
|
||||
t.Errorf("EstimateSmartFee() returned unexpected fee rate: %v", sf)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testEstimateFee(t *testing.T, h *TestHandler) {
|
||||
for _, blocks := range []int{1, 2, 3, 5, 10} {
|
||||
fee, err := h.Chain.EstimateFee(blocks)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if fee.Sign() == -1 {
|
||||
sf := h.Chain.GetChainParser().AmountToDecimalString(&fee)
|
||||
if sf != "-1" {
|
||||
t.Errorf("EstimateFee() returned unexpected fee rate: %v", sf)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testGetBestBlockHash(t *testing.T, h *TestHandler) {
|
||||
for i := 0; i < 3; i++ {
|
||||
hash, err := h.Chain.GetBestBlockHash()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
height, err := h.Chain.GetBestBlockHeight()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
hh, err := h.Chain.GetBlockHash(height)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if hash != hh {
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
continue
|
||||
}
|
||||
|
||||
// we expect no next block
|
||||
_, err = h.Chain.GetBlock("", height+1)
|
||||
if err != nil {
|
||||
if err != bchain.ErrBlockNotFound {
|
||||
t.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
t.Error("GetBestBlockHash() didn't get the best hash")
|
||||
}
|
||||
|
||||
func testGetBestBlockHeight(t *testing.T, h *TestHandler) {
|
||||
for i := 0; i < 3; i++ {
|
||||
height, err := h.Chain.GetBestBlockHeight()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// we expect no next block
|
||||
_, err = h.Chain.GetBlock("", height+1)
|
||||
if err != nil {
|
||||
if err != bchain.ErrBlockNotFound {
|
||||
t.Error(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
t.Error("GetBestBlockHeight() didn't get the best height")
|
||||
}
|
||||
|
||||
func testGetBlockHeader(t *testing.T, h *TestHandler) {
|
||||
want := &bchain.BlockHeader{
|
||||
Hash: h.TestData.BlockHash,
|
||||
Height: h.TestData.BlockHeight,
|
||||
Time: h.TestData.BlockTime,
|
||||
Size: h.TestData.BlockSize,
|
||||
}
|
||||
|
||||
got, err := h.Chain.GetBlockHeader(h.TestData.BlockHash)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Confirmations is variable field, we just check if is set and reset it
|
||||
if got.Confirmations <= 0 {
|
||||
t.Fatalf("GetBlockHeader() got struct with invalid Confirmations field")
|
||||
}
|
||||
got.Confirmations = 0
|
||||
|
||||
got.Prev, got.Next = "", ""
|
||||
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Errorf("GetBlockHeader() got=%+#v, want=%+#v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func getMempool(t *testing.T, h *TestHandler) []string {
|
||||
txs, err := h.Chain.GetMempoolTransactions()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(txs) == 0 {
|
||||
t.Skip("Skipping test, mempool is empty")
|
||||
}
|
||||
|
||||
return txs
|
||||
}
|
||||
|
||||
func getTxid2addrs(t *testing.T, h *TestHandler, txs []string) map[string][]string {
|
||||
txid2addrs := map[string][]string{}
|
||||
for i := range txs {
|
||||
tx, err := h.Chain.GetTransactionForMempool(txs[i])
|
||||
if err != nil {
|
||||
if err == bchain.ErrTxNotFound {
|
||||
continue
|
||||
}
|
||||
t.Fatal(err)
|
||||
}
|
||||
setTxAddresses(h.Chain.GetChainParser(), tx)
|
||||
addrs := []string{}
|
||||
for j := range tx.Vout {
|
||||
for _, a := range tx.Vout[j].ScriptPubKey.Addresses {
|
||||
addrs = append(addrs, a)
|
||||
}
|
||||
}
|
||||
if len(addrs) > 0 {
|
||||
txid2addrs[tx.Txid] = addrs
|
||||
}
|
||||
}
|
||||
return txid2addrs
|
||||
}
|
||||
|
||||
func intersect(a, b []string) []string {
|
||||
setA := mapset.NewSet()
|
||||
for _, v := range a {
|
||||
setA.Add(v)
|
||||
}
|
||||
setB := mapset.NewSet()
|
||||
for _, v := range b {
|
||||
setB.Add(v)
|
||||
}
|
||||
inter := setA.Intersect(setB)
|
||||
res := make([]string, 0, inter.Cardinality())
|
||||
for v := range inter.Iter() {
|
||||
res = append(res, v.(string))
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func containsTx(o []bchain.Outpoint, tx string) bool {
|
||||
for i := range o {
|
||||
if o[i].Txid == tx {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
33
tests/rpc/testdata/avalanche.json
vendored
33
tests/rpc/testdata/avalanche.json
vendored
@ -1,33 +0,0 @@
|
||||
{
|
||||
"blockHeight": 23253547,
|
||||
"blockHash": "0x987b44029c49a7ea619cf853edfb8ab35691f1121f4d497a1896714bfcf5b4ec",
|
||||
"blockTime": 1670262361,
|
||||
"blockSize": 865,
|
||||
"blockTxs": [
|
||||
"0x59a1c3ce0f901e71c4f1c88dc829e35d29ce900ae3a74366d16aedb4a2e33992"
|
||||
],
|
||||
"txDetails": {
|
||||
"0x59a1c3ce0f901e71c4f1c88dc829e35d29ce900ae3a74366d16aedb4a2e33992": {
|
||||
"txid": "0x59a1c3ce0f901e71c4f1c88dc829e35d29ce900ae3a74366d16aedb4a2e33992",
|
||||
"blockTime": 1670262361,
|
||||
"time": 1670262361,
|
||||
"vin": [
|
||||
{
|
||||
"addresses": [
|
||||
"0x2Dc3bbe90DD2d70dD9CF2D181ee667E95837b565"
|
||||
]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1.010479009433962264,
|
||||
"scriptPubKey": {
|
||||
"addresses": [
|
||||
"0x8D940A4859570754D364b86Ccc05052Ea5068Ea6"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
209
tests/rpc/testdata/bcash.json
vendored
209
tests/rpc/testdata/bcash.json
vendored
@ -1,209 +0,0 @@
|
||||
{
|
||||
"blockHeight": 538226,
|
||||
"blockHash": "0000000000000000008f48dad3a9efb25275fe36bb31b460e775af57783cc9af",
|
||||
"blockTime": 1531135480,
|
||||
"blockTxs": [
|
||||
"77360353ff628d53534201712db7a7689a3f9318cad240fbc093dfb4778fdf84",
|
||||
"82d95972a276b4197806ec0d9e3e56b66523849b2a7597ac509f4dfc8f7db4fd",
|
||||
"dae5609f757b56b3762e6f3edeaf741f34f1607646fbf9747ac36c14fd6ebe2f",
|
||||
"4cbcb154cac73dcae5e9cec9fb03fc585e46cff91a344fe960cef9fcd30744d1",
|
||||
"523b1b07c64df4649168f9d4dca6b9e272d7d4ae87a88261cca2c5b34fee5ddc",
|
||||
"79c5676e259314e4b90699beaff1e434c66ec6d575e9fa7bb32edaf8bf044920",
|
||||
"77d51574bac33a7a759a1cf17c5cd8c6e3fe0a361defbf6fd9c2857c84473800",
|
||||
"b55355977e4d2f463e42c6f8a5837f56f0a80bcada53783c64bfdc87b34b09cb",
|
||||
"70822dc8bc7818920cac6634b82f78253e4937fe99f3e9aaa8051319f20d1ac5",
|
||||
"92c7bfe5521717199f06ecd423afff1bd3f20d467fe78801b5ed7ee9702b14c1",
|
||||
"fcf359de95b9b50e7724612ce3b09af3e93232b4f7e26b4cc9bf713dfae5ce7a",
|
||||
"c2a50017fab2f2ba24c15c5c19ef6f38ae00c98a144143503bf020890a228a6e",
|
||||
"c72734f009c40adfd4f0976586a8f9fefdfa3ab4d6ebdd317e274a7b4c3952e5",
|
||||
"ff89de604401a7d455d19263be52b4462e31d66b72d3c451db069eb083298f16",
|
||||
"aae7b5b2b4dfc7dcb8be23d51fde0d02cdfabe9b87139b1814fca522d7af6191",
|
||||
"7020e48e4cc903f879aaa4cf19b4cf82cefd39e3f64aa9482321d8377d5f7dab",
|
||||
"d8995396fcd9b5c0f17fc186e30e9eda2520526475db136eacd23f3a7888a7c9",
|
||||
"6b6ee361223ae0c2ed748d488c009bb71e3c85c7c13260e973d17202355c8463",
|
||||
"e3b412cc12fbef965789aca1a7dafff098072de326f0d92c182fad2331f4130f",
|
||||
"fbe30ef4fe5ea1195e8e1d1e8af05f900e3bb97069af1240bc5b93e362fd1d3a",
|
||||
"2a3ded9b746ada7d304c49b14d30a8054836ebfb5e9fdbce18c022d295201297",
|
||||
"37b70da403680cf755eebe19b9787cc639ca4f3ca52df760fc93e508b07b4d02",
|
||||
"8665146f21b23d32d8b33de6bba8cc66372355f385b0d4770cad4de42d8f2039",
|
||||
"e2e1f1b15358aaef85209e4e6402986eabf983fd7038e98713fd070178f09b19",
|
||||
"273897f60055af5a7051b58d1b18fbe34098d504547ccbabbbd6b78cee6c384c",
|
||||
"7598a1220faca935e2f4cd9f0339e3441cb0e62bedead0c19eba94839621271e",
|
||||
"1984b8d380856d3578f3b54c150c48ef350393d40a0410ceef192a5fac7aba22",
|
||||
"4e2c9ac2a3982f9515d249ad4fcebf965cba82bb76ad2c85a9301f54ba448e09",
|
||||
"008b9317b6c6d6a470e935ce16dc3f687bb5b5bc0c1ff9ac09e2230929132904",
|
||||
"906f6a3e0318bc676c0b25be2f499697ae38e4943a4683d0e72de6c511261926",
|
||||
"cc55b080f3e84e4a62d1c5debb4383edde8007cbf79e20bef3900b32487d5395",
|
||||
"26382b2df16c7d015aa54f7f5d499135cfa6c2374744cd601662e41bfffe25bb",
|
||||
"725fcfe1d56d0777782c52f42f075a7ab695e289ae50c12741efabecca23959d",
|
||||
"f576642a691a5a2eab5288f767e6cdcd18e8e17866100b5070c14f664c33ac52",
|
||||
"a6938f2a894d9093b54e661d5a5ae38c2064ae17eec671dec3f5c68a47f19114",
|
||||
"478e97732767a8e533c7daa5720592a4d03ecf821a1a4f950711eef2c328a4fc",
|
||||
"b6ae14dbe2194339d91c0161b632fbae6a6ab77ab776d1e55c599abfc76dfd77",
|
||||
"5e0b7c04844d92c10f28d92c67dee07ebb024f0c45c4e666424cde5ea3b5cc5d",
|
||||
"2703725644bcb8f161871aea752be6962345dab84cfd14a349c72fb55e46b697",
|
||||
"ac17f66b1454c377e83f5c3615688e677b9f3461e5ccf50a9da7bd0b9de53f4c",
|
||||
"893bb6b3d04b60cc5a22d3ee58c7b80118739d587bcfb4c47db01b78cc942b25",
|
||||
"d01fc4fe1a700a34ee4677ddc9e5b4ee04271571c3f595aa7fd64d89d278e430",
|
||||
"4e1764abc5768700df0d4126c1851e94ff9f321233227bf650c0cba3ca243984",
|
||||
"a24f704d923fca4f8a608e1600f379083242ba380f2724485202e03a3ead187e",
|
||||
"b5a65490627fed826e7327f5da960a7988df0839e17f0baaee869035fcd025c7",
|
||||
"f4c2f9e9baacfca7feae42134c93e9ec14c3190824de61a27e49b8a9c8c7e1aa",
|
||||
"c904f24c9bca8ccdc7006926fb5684741354e6dd8f50e09680611a5b4d906bf5",
|
||||
"6389e85e9d80f636eb75349aa14803f957e5061bd6acfffaefea93ff96faf8a4",
|
||||
"4e160587f1ab6a577c875ff240ec23c86ab23272bb17d5f13265f20648f7d5cb",
|
||||
"3bf0e797f303fd23e118b0346c486e072a5ea9e3b2348051982b77a10aef2c58",
|
||||
"469bf541bef39dbeb94a674c5b2c59b6f8418556700a11156187947f89ef242f",
|
||||
"a6edc0a47307572dd4c18570e30b8f5111291b45d9c223bcb372d9352b0ff90a",
|
||||
"9d00d00c5c5f807b3c720779773e5207fb0eaa44f82578735bd72eefc90721bc",
|
||||
"1be354a762ab6a5545cfb0d3a687ec452fc67180232bfd9a5babaab53cae4af8",
|
||||
"6018a44e6a1a076aebaace302f1f0a91ebb30bae22d17b14d2b287d95c0e9d03",
|
||||
"c2bf0b22e0a037e74bab73519f37e23246ee5c38c6aab7615680272db1db6053",
|
||||
"7acfcf1df1b6a0b4238cedfae5460c145307f88dc2af4a02a465d1dc1e8779e1",
|
||||
"0f405e3d2baa17bd51974a2488d7db1b73b5a38b4d6b80d482b27e7e6b798105",
|
||||
"1d58f500407e72646f871204bbb7738550fcd092c7b06dc01bbede37ac577380",
|
||||
"48bdd8b9be4e69f5025c5817a7f0dd4bdd5aad9fbc01b75dff4f5fbdc4853488"
|
||||
],
|
||||
"txDetails": {
|
||||
"dae5609f757b56b3762e6f3edeaf741f34f1607646fbf9747ac36c14fd6ebe2f": {
|
||||
"hex": "010000000ae419f40608cb9c6f7f60e7637cfa804a24e88fc335bd20f02e58a3e0336949fe010000006a47304402200b65c51d1b28d093632845dcc461b4a17dc9c69bd8972b73606efeafc57b8bf802202870e05a0323875a42b7a8e889c1cbb23d720f870e434184ba78c01503fb9f6e4121025cf5b71049dc13e9a7c3694181a53a577f078b754af17bf3f46c62b7d3eac25cffffffffd7707af83ffa85d85fa90976bf07f86a16cce55dd478c996069ed74eb552d3e8010000006a47304402206360198b9242aa69bdb75041944deef29c262102af068772291c1db373d865d6022000e5a40de850863adac209fc44cc71dc7c6b9bb0c7ff73d2b5904134813b0c564121034b7bf67e6a5db08e770e9b767027db6a3ee282f1826b732a36b460ebb621a7e8ffffffff7beb0b9922e8c9a22d8a6d139e9bc437c07acc9a076351597549522d6d3e6416010000006a47304402206b5c1e31453971df2e27cd8921a8bef295bb31928fe96068d1bffa17aedabbcc0220447a59d5945faa854560c1d93c12e713ac1fb0cd4566b1313c40dd697bcd38af412102cc097d485edc2b02a783792d77cbee23d705eecca058b0b54dd511882b7ec820ffffffff14c90618216ffca61bc69f428da78e4623b36c015aaa671eb494a3f3246e0f2d010000006a4730440220444688840b45f8d9f8f01906183fd67da182f01dea160bef1b5eb30e13093ed802200ab83db99cc32fda6b8a4893a4fe44a762a6afe7a3d80b76c8796af817fc9a10412102c6c99563168fb40ee44c4c25d2611dc9ea76c2d9e518a3ce810562a107f6a04bffffffffc8de38882ef71750eb4dc23e22c95f834d1236670d16cbfc6555b3f7753010bf010000006b4830450221009cc33462b652838c1fe02ae944e9a50a1d0a5bc4c65d5c5cc7d90430174c88f802204cb91b0fa5e074009a0aac809dab67e56602e4a51fc6352d36babbe4734604c5412102b8304cfba0a7a24df69473be22cf7bc62e3d719679e3d52a0a5345dd58483385fffffffffdb47d8ffc4d9f50ac97752a9b842365b6563e9e0dec067819b476a27259d982010000006b4830450221008e984c6df0cd894c4969a8c3584dd812cccb29d00e87b835d6d23eb66d34553402203ed9119d8131b7edd1c0136f37e2373af4611e2dc1aec36ca713269cdcb83c014121027234a7262374f8b8793064c8e7a7906b17a93f988b461355635b8a91e3f944f1ffffffff9446697420f6ca01dddfb059963de1ed62c64d5f6d3450307eaf0cb88f5d4eb9000000006b483045022100b70f69ad8ae3d1b903bd11dd0f0209180c23aa7b44278ec64dbd10ffcde938750220294d22a879dcc4822c2e5badaa549515f50201bdb1ea9b4e630c5d9e159d189a4121033c2c6ee066476a1b6f20f77757e1f54feb8bfb9872f8eb34852634e6b14622dcffffffff504010c248a309ac85fbeb48ef9b75cb3ef33b24d7b10f253b9f61fcc6801959000000006a47304402206a0caea976601b61e0b40c48cc37a8af6b90fd70c5dbe81224fcc22b2cdf4268022009a160628a0105030e3b04709d419b22f6edcb8e8d387702347d3395ae2f72f4412102b8304cfba0a7a24df69473be22cf7bc62e3d719679e3d52a0a5345dd58483385ffffffffbc4bc11e944e4ca5c290e689aa7ce1d6a5f2a855b8764de07df1b6f992886722000000006b483045022100eff3309d7b06be2734c480877b614268fdd332f18f56d2477b07442a5e3ca9ac02206b7ca71c5eb39efebd9a91bfb527e6a3e8e8028cd058f879549b52dd15c13e9b412103771016d5bb022630aa22fd3768b20104b7afd1a645818eb5332da6f08a08ad3fffffffff224e2121feccec7f08e7a98c7beb26779c2d023110c120eaab673054c9925a52000000006a47304402203cac52163aebc2cf75b369d07b7453d6f50d68f7ef4c38501f1bc8b8ebc77f68022011022dfda86199a3bf4e8408c98c74f0afb89c94f4974530f4f5cce0d91d0c4e412103ef06894ab45fc4e4bd2d561e699d641ec02dcf52d5494f56067bb03d92c22553ffffffff0200b08ef01b0000001976a914ad8c8ff2bdbf19e7dc415d3c10349a5764d2032788ac7b3a0000000000001976a9145bccfdc1be63e73f9f0b6f4e229a9086c1c8c1ca88ac00000000",
|
||||
"txid": "dae5609f757b56b3762e6f3edeaf741f34f1607646fbf9747ac36c14fd6ebe2f",
|
||||
"blocktime":1531135480,
|
||||
"time":1531135480,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "fe496933e0a3582ef020bd35c38fe8244a80fa7c63e7607f6f9ccb0806f419e4",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402200b65c51d1b28d093632845dcc461b4a17dc9c69bd8972b73606efeafc57b8bf802202870e05a0323875a42b7a8e889c1cbb23d720f870e434184ba78c01503fb9f6e4121025cf5b71049dc13e9a7c3694181a53a577f078b754af17bf3f46c62b7d3eac25c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "e8d352b54ed79e0696c978d45de5cc166af807bf7609a95fd885fa3ff87a70d7",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402206360198b9242aa69bdb75041944deef29c262102af068772291c1db373d865d6022000e5a40de850863adac209fc44cc71dc7c6b9bb0c7ff73d2b5904134813b0c564121034b7bf67e6a5db08e770e9b767027db6a3ee282f1826b732a36b460ebb621a7e8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "16643e6d2d524975595163079acc7ac037c49b9e136d8a2da2c9e822990beb7b",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402206b5c1e31453971df2e27cd8921a8bef295bb31928fe96068d1bffa17aedabbcc0220447a59d5945faa854560c1d93c12e713ac1fb0cd4566b1313c40dd697bcd38af412102cc097d485edc2b02a783792d77cbee23d705eecca058b0b54dd511882b7ec820"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "2d0f6e24f3a394b41e67aa5a016cb323468ea78d429fc61ba6fc6f211806c914",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220444688840b45f8d9f8f01906183fd67da182f01dea160bef1b5eb30e13093ed802200ab83db99cc32fda6b8a4893a4fe44a762a6afe7a3d80b76c8796af817fc9a10412102c6c99563168fb40ee44c4c25d2611dc9ea76c2d9e518a3ce810562a107f6a04b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "bf103075f7b35565fccb160d6736124d835fc9223ec24deb5017f72e8838dec8",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009cc33462b652838c1fe02ae944e9a50a1d0a5bc4c65d5c5cc7d90430174c88f802204cb91b0fa5e074009a0aac809dab67e56602e4a51fc6352d36babbe4734604c5412102b8304cfba0a7a24df69473be22cf7bc62e3d719679e3d52a0a5345dd58483385"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "82d95972a276b4197806ec0d9e3e56b66523849b2a7597ac509f4dfc8f7db4fd",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221008e984c6df0cd894c4969a8c3584dd812cccb29d00e87b835d6d23eb66d34553402203ed9119d8131b7edd1c0136f37e2373af4611e2dc1aec36ca713269cdcb83c014121027234a7262374f8b8793064c8e7a7906b17a93f988b461355635b8a91e3f944f1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "b94e5d8fb80caf7e3050346d5f4dc662ede13d9659b0dfdd01caf62074694694",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b70f69ad8ae3d1b903bd11dd0f0209180c23aa7b44278ec64dbd10ffcde938750220294d22a879dcc4822c2e5badaa549515f50201bdb1ea9b4e630c5d9e159d189a4121033c2c6ee066476a1b6f20f77757e1f54feb8bfb9872f8eb34852634e6b14622dc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "591980c6fc619f3b250fb1d7243bf33ecb759bef48ebfb85ac09a348c2104050",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402206a0caea976601b61e0b40c48cc37a8af6b90fd70c5dbe81224fcc22b2cdf4268022009a160628a0105030e3b04709d419b22f6edcb8e8d387702347d3395ae2f72f4412102b8304cfba0a7a24df69473be22cf7bc62e3d719679e3d52a0a5345dd58483385"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "22678892f9b6f17de04d76b855a8f2a5d6e17caa89e690c2a54c4e941ec14bbc",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100eff3309d7b06be2734c480877b614268fdd332f18f56d2477b07442a5e3ca9ac02206b7ca71c5eb39efebd9a91bfb527e6a3e8e8028cd058f879549b52dd15c13e9b412103771016d5bb022630aa22fd3768b20104b7afd1a645818eb5332da6f08a08ad3f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "525a92c9543067abea20c11031022d9c7726eb7b8ca9e7087fecccfe21214e22",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402203cac52163aebc2cf75b369d07b7453d6f50d68f7ef4c38501f1bc8b8ebc77f68022011022dfda86199a3bf4e8408c98c74f0afb89c94f4974530f4f5cce0d91d0c4e412103ef06894ab45fc4e4bd2d561e699d641ec02dcf52d5494f56067bb03d92c22553"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1200.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914ad8c8ff2bdbf19e7dc415d3c10349a5764d2032788ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00014971,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9145bccfdc1be63e73f9f0b6f4e229a9086c1c8c1ca88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"79c5676e259314e4b90699beaff1e434c66ec6d575e9fa7bb32edaf8bf044920": {
|
||||
"hex": "0100000001b9547353709f8668d4f059d5491dbb7ea15c41ab1946d8c597245afd7478f352000000006b4830450221008bbc49fb920dd06eacc662f05357318bd52ee1edc35eae02f0068514fc7e27b002203e1a6c33b05bb000427c6c711f1cee7ac9d348a521d0c51da3eb07f68ab26298412103d685ca4f94f5fef7d09670644d6504f0af7645fb7ea77a094e5d5aebfabc52baffffffff0200ca9a3b000000001976a914abffa2dd1ea86322b2814df012d08e010d02593788ac12868ae9000000001976a914401c48f19bc49dc89152c098300033e463e17a6488ac00000000",
|
||||
"txid": "79c5676e259314e4b90699beaff1e434c66ec6d575e9fa7bb32edaf8bf044920",
|
||||
"blocktime":1531135480,
|
||||
"time":1531135480,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "52f37874fd5a2497c5d84619ab415ca17ebb1d49d559f0d468869f70537354b9",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221008bbc49fb920dd06eacc662f05357318bd52ee1edc35eae02f0068514fc7e27b002203e1a6c33b05bb000427c6c711f1cee7ac9d348a521d0c51da3eb07f68ab26298412103d685ca4f94f5fef7d09670644d6504f0af7645fb7ea77a094e5d5aebfabc52ba"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 10.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914abffa2dd1ea86322b2814df012d08e010d02593788ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 39.18169618,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914401c48f19bc49dc89152c098300033e463e17a6488ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
112
tests/rpc/testdata/bcash_testnet.json
vendored
112
tests/rpc/testdata/bcash_testnet.json
vendored
@ -1,112 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1241851,
|
||||
"blockHash": "00000000ff54973b45ac277fc9e92408479703d785eae0e96508bc5aa792d621",
|
||||
"blockTime": 1529571678,
|
||||
"blockTxs": [
|
||||
"0cbcd28da300a850fd922caf633f2aaca0fd0a2d4ce46c6f07314c644287527a",
|
||||
"32fe2a3a60eb952d6ade53b7030ddb6ad8af5797391857baaad37c5b20f3b5ca"
|
||||
],
|
||||
"txDetails": {
|
||||
"0cbcd28da300a850fd922caf633f2aaca0fd0a2d4ce46c6f07314c644287527a": {
|
||||
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0a03fbf212055374617368ffffffff01483b5009000000001976a914014dc11b35cafe7605b4c1798a5b86efd788cff488ac00000000",
|
||||
"txid": "0cbcd28da300a850fd922caf633f2aaca0fd0a2d4ce46c6f07314c644287527a",
|
||||
"blocktime":1529571678,
|
||||
"time":1529571678,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "03fbf212055374617368",
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1.56253000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914014dc11b35cafe7605b4c1798a5b86efd788cff488ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"32fe2a3a60eb952d6ade53b7030ddb6ad8af5797391857baaad37c5b20f3b5ca": {
|
||||
"hex": "010000000321d231b0d81f74e29145cc5c7dc92b45aecaedc84ed0178d223c1ba75024ff58030000006a473044022004739fe75329dee2f6deedca41eec94ca9c5d6e3a3ad807f28813c81406b6db002204153c2c0c72214295aaeb637ff6390e8ea220adf7ef30f5c0e7b95933f880bed4121027909d648cd5d774d250e5f8ab4c4aadfba07f4abb835f9100387bdc047e176bcfeffffff21d231b0d81f74e29145cc5c7dc92b45aecaedc84ed0178d223c1ba75024ff58040000006a47304402206fd8709b72836a8a7c7d3059a2bcd11e835de7966277aa14a70aaa978a557ea3022036dc594d1050e98091f2382715461bae03faef774ca7ec1f9d6bd852cf3e12a84121028b5d4e481b88bcdb98cf5baff279ba364d73cf1a001bcbebee25895577897e67feffffff21d231b0d81f74e29145cc5c7dc92b45aecaedc84ed0178d223c1ba75024ff58050000006b483045022100cb820ff34bad9ac75e73c8eedc0929547021ec2e0b9099db39177702c1d5ac3802200f2b9727a1396f68e3bcf16a9b5f2ea0587a3496d9f483007b1d940a6edeb52841210387f3f2b2ef3d3ee85fb4530bb702af0fa3644b23d61e8c0e50c87d828cf27136feffffff06e8030000000000001976a9142d2fa4c2a38862814cca01f2f0b78d58f093dfc288ace8030000000000001976a9140ab1ed3b3358a1caec5e75475a1db96b668432b288ace8030000000000001976a914a65b5515f02325e02d3a296be60fe6f612265ea088ac60670100000000001976a914fc92ae15367bd3f9154bf475e07a4017bfadccac88ac48d0bd0b000000001976a91496c4871f24d2534c7c592699045940df9f3cb70088acc0150c00000000001976a9149c0d281ac7ae4e471cdd607af502cdeb038849c488ac00000000",
|
||||
"txid": "32fe2a3a60eb952d6ade53b7030ddb6ad8af5797391857baaad37c5b20f3b5ca",
|
||||
"blocktime":1529571678,
|
||||
"time":1529571678,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "58ff2450a71b3c228d17d04ec8edcaae452bc97d5ccc4591e2741fd8b031d221",
|
||||
"vout": 3,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "473044022004739fe75329dee2f6deedca41eec94ca9c5d6e3a3ad807f28813c81406b6db002204153c2c0c72214295aaeb637ff6390e8ea220adf7ef30f5c0e7b95933f880bed4121027909d648cd5d774d250e5f8ab4c4aadfba07f4abb835f9100387bdc047e176bc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "58ff2450a71b3c228d17d04ec8edcaae452bc97d5ccc4591e2741fd8b031d221",
|
||||
"vout": 4,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402206fd8709b72836a8a7c7d3059a2bcd11e835de7966277aa14a70aaa978a557ea3022036dc594d1050e98091f2382715461bae03faef774ca7ec1f9d6bd852cf3e12a84121028b5d4e481b88bcdb98cf5baff279ba364d73cf1a001bcbebee25895577897e67"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "58ff2450a71b3c228d17d04ec8edcaae452bc97d5ccc4591e2741fd8b031d221",
|
||||
"vout": 5,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100cb820ff34bad9ac75e73c8eedc0929547021ec2e0b9099db39177702c1d5ac3802200f2b9727a1396f68e3bcf16a9b5f2ea0587a3496d9f483007b1d940a6edeb52841210387f3f2b2ef3d3ee85fb4530bb702af0fa3644b23d61e8c0e50c87d828cf27136"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00001000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9142d2fa4c2a38862814cca01f2f0b78d58f093dfc288ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00001000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9140ab1ed3b3358a1caec5e75475a1db96b668432b288ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00001000,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a65b5515f02325e02d3a296be60fe6f612265ea088ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00092000,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914fc92ae15367bd3f9154bf475e07a4017bfadccac88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.96989000,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91496c4871f24d2534c7c592699045940df9f3cb70088ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00792000,
|
||||
"n": 5,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9149c0d281ac7ae4e471cdd607af502cdeb038849c488ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
80
tests/rpc/testdata/bellcoin.json
vendored
80
tests/rpc/testdata/bellcoin.json
vendored
@ -1,80 +0,0 @@
|
||||
{
|
||||
"blockHeight": 195604,
|
||||
"blockHash": "00000124fd5a9c1225a5964675c833f6e67b7c94e1414ad43c006ac0e5f47961",
|
||||
"blockTime": 1548485163,
|
||||
"blockTxs": [
|
||||
"0a0c091619bff958253300ca0f0bd40528a429010aef35c63f01cc7a59cf4c7a",
|
||||
"96853036083e2ef6e06cd55e0fdd971a41987157952d01a40d4755ddd6880ee1"
|
||||
],
|
||||
"txDetails": {
|
||||
"96853036083e2ef6e06cd55e0fdd971a41987157952d01a40d4755ddd6880ee1": {
|
||||
"hex": "020000000190ab97bb210cc3573fd619813abdfd5c74fd64f48cd5b6deb528ffc0ac2025d2010000006b483045022100b357154a034a8b2775f188da68a00bb282743bbf138038be66f66623082dec830220143aa4786f7a28b4f47333562964033aeb822e3dc48589cf80217244f0cb7e05012102d89a3fb18e04f9e4e91437d008e6f323e5a1308bf312066a09bb83c15739dfb2feffffff07ec235e08000000001976a91441ca8a78aab59c02ebd17d25dc196da34b2cafe788acf0870b060000000017a914bb073b44334b112793b1d9db0709ea7f02a22039876fc061070000000017a914ffea83b42b127b8b5a1bc984ae9d45ec08c92b84877dbaf311000000001976a9143acb8a0091a159337c53e40c3bf5b38d56f4e55588ac70e07b0b000000001976a9141a85678940ac58b5c84231b7e230a99dcc10247388ace84108020000000017a9140191d42d0433b7721c76332a2f1ab6e7f809fc8f87072857060000000017a9147ec3793cafc0b2380a410578b1b5c4d79b090d598713fc0200",
|
||||
"txid": "96853036083e2ef6e06cd55e0fdd971a41987157952d01a40d4755ddd6880ee1",
|
||||
"blocktime": 1548485163,
|
||||
"time": 1548485163,
|
||||
"locktime": 195603,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "d22520acc0ff28b5deb6d58cf464fd745cfdbd3a8119d63f57c30c21bb97ab90",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b357154a034a8b2775f188da68a00bb282743bbf138038be66f66623082dec830220143aa4786f7a28b4f47333562964033aeb822e3dc48589cf80217244f0cb7e05012102d89a3fb18e04f9e4e91437d008e6f323e5a1308bf312066a09bb83c15739dfb2"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1.40387308,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91441ca8a78aab59c02ebd17d25dc196da34b2cafe788ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.01418992,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914bb073b44334b112793b1d9db0709ea7f02a2203987"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.23846767,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914ffea83b42b127b8b5a1bc984ae9d45ec08c92b8487"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 3.01185661,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143acb8a0091a159337c53e40c3bf5b38d56f4e55588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.92667760,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9141a85678940ac58b5c84231b7e230a99dcc10247388ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.34095592,
|
||||
"n": 5,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9140191d42d0433b7721c76332a2f1ab6e7f809fc8f87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.06375175,
|
||||
"n": 6,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9147ec3793cafc0b2380a410578b1b5c4d79b090d5987"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
197
tests/rpc/testdata/bitcoin.json
vendored
197
tests/rpc/testdata/bitcoin.json
vendored
@ -1,197 +0,0 @@
|
||||
{
|
||||
"blockHeight": 529150,
|
||||
"blockHash": "00000000000000000035835503f43c878ebb643f3b40bdfd0dfda760da74e73c",
|
||||
"blockTime": 1529915213,
|
||||
"blockTxs": [
|
||||
"8dd1379174e262d12a32d217e87a7caf09fa1b9e48a6fe010cac219f18c6de58",
|
||||
"5fce44793b328ca5f142caadbf29efc78a0059d7a6379dff81fc6447b519a7c3",
|
||||
"d5daab5d57ef089b0464932443bb52a818860e93c6a23d9a66e0749e0cc146da",
|
||||
"96bf6e66ed65e6003b1c751a51ad6a4fa17465c73b64211989ebd50413a9cdc9",
|
||||
"a81addeae3cddf2cb69a70f4dd85e2829bacc474b98a97ece6a7872cd15c37fe",
|
||||
"dd6169e9227bc00e2f2bddf4f1eef6126998d984ce13083d7a11c6972ec6d25d",
|
||||
"ca211af71c54c3d90b83851c1d35a73669040b82742dd7f95e39953b032f7d39",
|
||||
"0d1463f05662ef6fa73f37c030908b8d890b8dabe217c25ebaf07057ecafafca",
|
||||
"2276c68760b3ff3d32cf4ede7e4eb4be95b01d04629145a16bc57830b33fbc01",
|
||||
"3abc8d3485a7505087997d63a72bb86d3cfce1b6b0057da722e2ae24715d8be5",
|
||||
"88db71956b653875a06a84bbe6ef166df3b50c94a908f82d457192835be47c07",
|
||||
"973e394c11a4339b25803eff85e9299688489c7e71b9110e77a6c469f996f9b4",
|
||||
"7afbc04c39707ca334a6db6b94ec2421798770d6593b4ce1f19f64f6a6ae77b2",
|
||||
"2a047219a5858c5a0068822b81775789ee07cdf0cdc91a2775dd2d520f390aa2",
|
||||
"2ea3eebcdb11b46f0e5b42b7718eb1fb709b625bec98bee5e3bb7de32d456360",
|
||||
"d37ee9bebeedb5aac15ece6e5d497371a43b4e93a060a92006530eb77d6fbd8a",
|
||||
"a029561cbffc0b79bdc23fa987e463b16342aef976562ce13c213fa556d860ec",
|
||||
"8f0e21edeff8b6654338c67b4e6980d82634c0d10509923afcab7a831a46683c",
|
||||
"6884c257e43d4c7a81739acf852952b45d5bfb5fc07816fca326b94b174733c3",
|
||||
"0206990ff4387238953164731fc7b3d216432e58db21a180bfd3eeeb8bf3e36a",
|
||||
"f05d76253daaa0584feeac9b1ff7e57e8962dfa0731a8875a52871b201ce3bc5",
|
||||
"65149c5de02e58416b7f923c0db4f1b3a945afbd8bd815beefc052e14bd7ac7d",
|
||||
"e732c8fb6a2da39b22a39207d84ac0bd7450ced28617a47cc6b5b1166b9a74ec",
|
||||
"24f4a06a88f234b63935ef74a7e42223ec8ab22689d497b2a29aee526dbdbb3e",
|
||||
"6066e3885dd13f8ffdcb0d1a849a45bb79e0a2d0c140f7a45e957f9e9c1d7d39",
|
||||
"43b3fa3c6e857df0a52ddc3d2e7fdb0c6593b1cda65251b5a4eef06bced31883",
|
||||
"86c5b32ee229a59339caca990a364490fb9e2c7e5493810982849cb1d8e13f1a",
|
||||
"95c9ea5d7c79cba2fd3ae868f1a73fe242ca3917ceef7027e9251b4d666fc43d",
|
||||
"655296c13411a8973e97cab768f560f0dd297994c0189e9ca286adf4ec04393e",
|
||||
"2cf86550a3a2497009b296e451cb94e58b713f3c2859e273fe2e4e160784672d",
|
||||
"e89effee8a2787007b49d2fcdc880c66b2c1dc76bbf258e25f4dc07e8b362a8f",
|
||||
"191f2d7ef3f7c2693a9930f4fcfa80769139fb7e10289dde71caa9102a329c39",
|
||||
"6d5cf483c0013281a267bfa1d69fbe0a372c93b51eafc6c3b1ed2bb880b420e5",
|
||||
"932684b0ce065488c8da5bc92b3a0c082971474ca48957c6c5c59bd20c37f285",
|
||||
"33666f78256725d68a15b8e52c9c84ab6dbd7f74da474eb92e0909b3ff0f1c73",
|
||||
"6e1df5ec9851f403b994d6a53e5aa8912838c9b775d250cdf31fcda0c2f1f4a4",
|
||||
"ce87eccf8a294e2e0110d56a6ec1e5a4f854aea74a5bf7e7b00f9dd32ecb9341",
|
||||
"820ed342a2e62613173c365b6ef9b35e4956d46a9f310fe4c4228488bf981a1e",
|
||||
"4bd73f5b3e2f833e2922a62816d7fac391e7ecc3f628c7f15964efb64c4868fc",
|
||||
"c3f2fab2af1efe1d8725497567cd6c791372ce3c71a2358e0f2ca175bdeaf9ca",
|
||||
"aa4498ad03c15068515b21df561560fbbfc56d1bc05e8f396d2d22e023cfd19f",
|
||||
"956e313eeb2a3364b6439d23338ea2e48a98ab04b9c82e2776d844c6247b4b77",
|
||||
"22787283751d501687c42396110a59a390b45cc05ccf57493e523e2d66bfff31",
|
||||
"a5a1c30d7b2e01e0b26179c74da3ecc1b68265583184fd548f5059d312ae3414",
|
||||
"62ecf5ec79801ed7e4012ca8037d8deedc95e5c30ca7ec112a90d4ec5506eb6b",
|
||||
"1898e3f94a7d68c73e828a0c87a74ff6f172f2b24240858229e63d603616fb21",
|
||||
"cee2b19dc3021ecfb8a1f68060757d828088387708571c6a224e89a1ed9c14e6",
|
||||
"930d785b0fa219930886cd5e93bab9f1f2111c67a5c089ee329745b2678c841d",
|
||||
"7ad9179b7d990637f905ae3eb74b65792a3a7440aa7f59ba5274e211b26f649b",
|
||||
"3e1ee4ddd2a990fc3195117005b4c53c9367316e85813ee437c43e927af08155",
|
||||
"76cd3f44f4186757b0f2b83b66dfa02a85012f93a25d2ad670f30b97382adbb7",
|
||||
"2e48b382fb84ac83f34e8c37baf89e6a87836b6eaf2a9180dcfd03d2816b4aee",
|
||||
"dea813a8a0f702ba2800dd7046b138e81568edb089d26d93ee7a979225690e91",
|
||||
"512c4c97ad1763bae3c0998d154e0e32897da633bc1558963d75dc57de164c8c",
|
||||
"39d34eaec9b399df80b3d05b4b211f1b7b220578d13c9666a63f202afa8857f3",
|
||||
"a79823ca003b64d78ccf28fad693eebba7e94c3089340c202199a459bc50dcbb",
|
||||
"faef230df22406f367ba2e838b16eca0b581249a4476acc1a978613816dbec02",
|
||||
"d99db7838ccb76c0ecfaa57b2c690cec56a711a5d880fe4e54853256bf213079",
|
||||
"115122280ce9b781014584968e4b3e851e37141d81ebd403179c48c908672e92",
|
||||
"7e08d9ec508fbaa69163e5aff05baf0e57af7503e11ac0dfe5dfeaf7b5f223c5",
|
||||
"55c019b5aa708fe6c35e188db3f9561ff552ddb7edd142e3b4ca3743ee5ac6da",
|
||||
"dff909d9469761d365083d1ba2e8702879d3455b03f09d98bbf3eee43ed155f6",
|
||||
"81ce5eef1fcf57787da3c9deb75e715ba4039ea3c4a48cf5ed5206b889c3bc27",
|
||||
"4d5d6fb00364fc40880f2912a28f1a6db506061dc85820d19af84ec31b5e5e60",
|
||||
"4e9d2f8ff1b2e603d31449373d3b8a312661d6405e4be0aa2c679fecd486df7f",
|
||||
"f7eb6eb8a3b5699956581c3e68b08f05da818e7bb1e2c28276cd638cacda7994",
|
||||
"8b485e079126145df5704a813662e08f748fad098ea8d9b6b896879625724392",
|
||||
"f7f05d889261ecc26968dbe03051e113584df5ca0c4bcff9e27664413c2e73d6",
|
||||
"b4c531ea13369004393b5fc6835f5ac74bdc2f23adc5ad8e44a34256867496e2",
|
||||
"3f63d00841e688e7006c7dff76c04a8caf183db36e00fb130b2a9bf64fad4cc3",
|
||||
"edec5964af29256872caff91a8b74308346a10eaa1d17e5eeba4f5f0a4da8109",
|
||||
"0d5db84f971ebdacae606c5f7c55a1d309ce6b45c5c1cab4097007047af4639b",
|
||||
"2e438cad664dd495a7aaec45622880e3255f0822583b3ab5f7921800f49f962f",
|
||||
"bb1c7b6b4c921283ac7f3683226d913824050bbb2150d58dae47c0dc541541a8",
|
||||
"65d7aeaff3c481baca79cb2f3ca98026214258ca35bc78d4fa19aac8b01403ba",
|
||||
"2ca7b1392be38314e4faffd4dd586327f27320fc7eeaaa8389f29a56a6e2d6ed",
|
||||
"63da0eb29ad6c2523348f3bf97f78bd76124cd668a91b499553ac30aad7667d1",
|
||||
"3f53be6d1ea2147f0c125da925b0bf95eadc74091e99fd9b79b562c507699446",
|
||||
"023359558fa22bfa518f82e6a261079cce8b59b1cbe286d11ec741dae72a8d30",
|
||||
"44d69736e6bef4885b6a2442ea4644da3c56586bc6cbabc984a23ce4a266cf54",
|
||||
"e735844e2f88551f8da8a69171a05fda47fbdaa4ecd3d29b98eb167789f7a3ac",
|
||||
"60428a78761e84826168626da18e7407780bd1188c13e6d4f12aaa67b632e0bb",
|
||||
"ada31e8d2c0670ed091a0f75008ea3f0c37fc000f704c4b60575a69a0fda96c1",
|
||||
"bc31227b15cf5ddcd5035c220dc9a37c39213dbaa97e536eb36339251750e202",
|
||||
"90d51a46469bd8185245760ed25425dca259ffb1bda812c06bfabbf99dd54bf7",
|
||||
"c46129d75b7ec2d85d166f1347a4c47c461d3dcd823a1f9b6e25ef41bd04d6a2",
|
||||
"1ffe0fabb57af65df1dd8cf433298118deb9b10f7b91036e4accb94275d66801",
|
||||
"6a7250ede081a5df65c263bef36954027cf4956e920f4dc8a143a9dc735f7470",
|
||||
"f6a768252ef749a1ebc5a7240eae4367d1a0d1fbb7659839ed994c261c887ac6",
|
||||
"01899428b0238563ec0e219bd96221aa9c2c24fd0287c174e147d5bab2a72ce2",
|
||||
"d998a18380d0ff7a772e32b6a9d92236c0634965ae5f51a0a18e9136320554ef",
|
||||
"85e95bada40bbf15df5929c8f052f6dc1eb12322c321441fa5aa009ac40f19d2",
|
||||
"1b0dee271db263e03a7da56364773e89b1ba2153e7ccf0d4c1c80797eef8478c",
|
||||
"19c80c35d5322c290c0ac68bd80507b826b17b6a9fca6f14ba5d054b573fb5e4",
|
||||
"f9a4ccfad5e6c49c75d254d3bdb196c37731b99e99315551b6de111da09fb36e",
|
||||
"edb417ef42cccd22f1e6f6fc6dc66c2c1217a155fab18c1ceb494f33c6e03c5d",
|
||||
"75c25c7fd1f06d5d63e3265c3eb35c0e05aedaeac7e5b085285ddfab34f0a83d",
|
||||
"92b420a8508fed0b94227f331aec6d6593444ff889724197973c89df609f504b",
|
||||
"f9305e5fcbe1a303702388aaffb9a2cfd1b246a1db77bbd393b48a0276b54d54",
|
||||
"f5eb58e2dc2fb8afb00508d1c407453f1e36a7a8cfa2e67006aad545a8558f63",
|
||||
"67a7f5340f42fe61534716aa6b5fff1e04e31afb355b0431e2f61363ceef9095",
|
||||
"4f1588d77167028e76db46ce3d0abb8722e02a8b1900a73d7bc0e1fef6c841be",
|
||||
"456d721f9ea96d2cd7e60cec26eb294e897427bffa6a4c3bb25acfdc086173bf",
|
||||
"eb68c506de42f1b59ec0ab7273872f78b0eee5d2ef57a09ece87b37c342fecda",
|
||||
"0ffa190c414ffbb75a50853e9167f10778aca7fd7ac10d6b7178708812e143d2",
|
||||
"c29a75edd34b55322b79c38a1a44be6e43e737539da389000b4d8b6e00d53c38",
|
||||
"858b16eed193442d2ed01fa8687a5052d45ae27ef0fe285252bc7e734879497f",
|
||||
"5bb96e0791ac797516e5fec6b70b469b1d1fd05bdd58c7d212b6a77af9bdff84",
|
||||
"f141f208343ddeeb9da8797a2e15850979e71a1bbe69b225652fedb00c5e4987",
|
||||
"a206757d3d27493d8ce80ed84ae907d283f7db7bf057aaccc182a15809b847b5"
|
||||
],
|
||||
"txDetails": {
|
||||
"ca211af71c54c3d90b83851c1d35a73669040b82742dd7f95e39953b032f7d39": {
|
||||
"hex": "01000000014ce1dd2c07c07524ed102b5bf67d9eb601f65ccd848952042ed538c7bcf5ef830b0000006b483045022100f0beea3fada8a71b7dba04357112474e089bc1bd6726b520065a3ba244dc0dcc02200126f8cbbec0c21ea8fed38481391a4df43603c89736cbdc007e5280100f5fd401210242b47391c5b851486b7113ce30cbf60c45a8e8d2a6f7145a972100015e690a25ffffffff02d0b3fb02000000001976a914d39c85c954ae3002137fe718c2af835175352b5f88ac141b0000000000001976a914198ec3f7a57bc6a1dc929dc68464149108e272bf88ac00000000",
|
||||
"txid": "ca211af71c54c3d90b83851c1d35a73669040b82742dd7f95e39953b032f7d39",
|
||||
"blocktime": 1529915213,
|
||||
"time": 1529915213,
|
||||
"locktime": 0,
|
||||
"vsize": 226,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "83eff5bcc738d52e04528984cd5cf601b69e7df65b2b10ed2475c0072cdde14c",
|
||||
"vout": 11,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100f0beea3fada8a71b7dba04357112474e089bc1bd6726b520065a3ba244dc0dcc02200126f8cbbec0c21ea8fed38481391a4df43603c89736cbdc007e5280100f5fd401210242b47391c5b851486b7113ce30cbf60c45a8e8d2a6f7145a972100015e690a25"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.5005,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914d39c85c954ae3002137fe718c2af835175352b5f88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00006932,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914198ec3f7a57bc6a1dc929dc68464149108e272bf88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"faef230df22406f367ba2e838b16eca0b581249a4476acc1a978613816dbec02": {
|
||||
"hex": "0200000002a73d71157ae5f4372fe4624681bd72946a026e87a90cb2f307675146d5883941000000006a47304402202a6339b584730131f07c0c69ea40f08bc5c44cb161036509d2d0bef103c178c702206c0536316244acfdb0a27bf9a2ba4a6830b19ddc0fafd92027619dd4aa290bf1012102964e49b139cf408a30d4fc15e079789491689be74d63797e6bcbbe4191c8b691fefffffff9709ad0025e3968919c638559d00f8c8240b9b26a6624cc008548047e7af488010000006a47304402201cac13c2cbac8e536bc922462f810ffc086e8cf4a51a7f73d8d08aaf56372d6902206cc3518b6024d9b7c4f2f30e5dbb954f6d4d77e6b76eccc1081a8ed505892a7001210209fa85c88fb0b628305a169ca62a103c0da2cace04300810ae57755ef31caae9feffffff02ea3a0f00000000001976a9143e3fc495d359f2d346af7b42f70ddc7bb4981c1788ac40c06503000000001976a914f4274a0adee47dfab83664493bf252e3da0b5f5988acfd120800",
|
||||
"txid": "faef230df22406f367ba2e838b16eca0b581249a4476acc1a978613816dbec02",
|
||||
"blocktime": 1529915213,
|
||||
"time": 1529915213,
|
||||
"locktime": 529149,
|
||||
"vsize": 372,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "413988d546516707f3b20ca9876e026a9472bd814662e42f37f4e57a15713da7",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202a6339b584730131f07c0c69ea40f08bc5c44cb161036509d2d0bef103c178c702206c0536316244acfdb0a27bf9a2ba4a6830b19ddc0fafd92027619dd4aa290bf1012102964e49b139cf408a30d4fc15e079789491689be74d63797e6bcbbe4191c8b691"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "88f47a7e04488500cc24666ab2b940828c0fd05985639c9168395e02d09a70f9",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402201cac13c2cbac8e536bc922462f810ffc086e8cf4a51a7f73d8d08aaf56372d6902206cc3518b6024d9b7c4f2f30e5dbb954f6d4d77e6b76eccc1081a8ed505892a7001210209fa85c88fb0b628305a169ca62a103c0da2cace04300810ae57755ef31caae9"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00998122,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143e3fc495d359f2d346af7b42f70ddc7bb4981c1788ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.57,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914f4274a0adee47dfab83664493bf252e3da0b5f5988ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
89
tests/rpc/testdata/bitcoin_signet.json
vendored
89
tests/rpc/testdata/bitcoin_signet.json
vendored
@ -1,89 +0,0 @@
|
||||
{
|
||||
"blockHeight": 15254,
|
||||
"blockHash": "000000e3c2b5c8193b96d7ddfab11d7ba04ecfa4f09c7c73ef565af8a3d5731b",
|
||||
"blockTime": 1607488510,
|
||||
"blockTxs": [
|
||||
"484cbfd56b5f3ae079a2e48acd107cf63cbf6139249a69ad6a4f0f85a28e9187",
|
||||
"175b6cbdc5155069339f01852ffaaa9908b8528b568ea24c5a6d1b64a3c2cda3",
|
||||
"c3ae1e409836b70b1007069b3943d4cba64e8322b0badf811a671e154dc7a11d",
|
||||
"1f1f01af015cbfc2e6ad40af3cd65dd5a89d2492ccb9dcbd8554f4ecfe3ec7e0"
|
||||
],
|
||||
"txDetails": {
|
||||
"175b6cbdc5155069339f01852ffaaa9908b8528b568ea24c5a6d1b64a3c2cda3": {
|
||||
"hex": "02000000000101a80513c9c4a45e95089c7f574d5b793f1446128ef316f4353abbc4512dfc14930000000000feffffff02a086010000000000160014d2850d5a21ab3ca3fa2b395c2e6c354f3cae5a239cb00d0000000000160014c9df5d6ccbc6d067d1982267f5b06db644f4218f0247304402204fd46878214ac9cde3acbd5ffac35f7ea9773691090fee894457e626634b720c02201b8c66173193f74f4978703fe02f81ac0839dcebb25cc0cebe31ed5924871f48012103ecfc7e8d21743fe2677057b12b5bb608efd0e8ce065e467e584a48b0656f2c20953b0000",
|
||||
"txid": "175b6cbdc5155069339f01852ffaaa9908b8528b568ea24c5a6d1b64a3c2cda3",
|
||||
"blocktime": 1607488510,
|
||||
"time": 1607488510,
|
||||
"locktime": 15253,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "9314fc2d51c4bb3a35f416f38e1246143f795b4d577f9c08955ea4c4c91305a8",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.001,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014d2850d5a21ab3ca3fa2b395c2e6c354f3cae5a23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.0089718,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014c9df5d6ccbc6d067d1982267f5b06db644f4218f"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"1f1f01af015cbfc2e6ad40af3cd65dd5a89d2492ccb9dcbd8554f4ecfe3ec7e0": {
|
||||
"hex": "020000000001027386c85b8e00a7a0b19e20c04b9feaa7f60876d7c721301b4f150fa31f24502e0100000000feffffffa3cdc2a3641b6d5a4ca28e568b52b80899aafa2f85019f33695015c5bd6c5b170000000000feffffff022476010000000000160014745e303dc3ded3cf4407bff76bb287f3c05df1c8a0860100000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac0247304402201c2a302a96a28b5effe632e2cc312793d1163311ad50c7dc65aa1a3caef809e502206d54609b7b4bae245246db6f521d71221aaa24b0eb0f1a856fd75d35d3fc302d012103ecfc7e8d21743fe2677057b12b5bb608efd0e8ce065e467e584a48b0656f2c200247304402207cc78f7f28844dd0a1a1c7857261b57f0c5b4ca7d2118e9ff26cdd9fa42933880220543f6a5b84bd16988176068e6861d634c5850da44badc73915bce9117a1bc0c9012103190640ce052336349c617faca40370c452c7b48ae1aefbd3cc2a08a154ec843c953b0000",
|
||||
"txid": "1f1f01af015cbfc2e6ad40af3cd65dd5a89d2492ccb9dcbd8554f4ecfe3ec7e0",
|
||||
"blocktime": 1607488510,
|
||||
"time": 1607488510,
|
||||
"locktime": 15253,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "2e50241fa30f154f1b3021c7d77608f6a7ea9f4bc0209eb1a0a7008e5bc88673",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "175b6cbdc5155069339f01852ffaaa9908b8528b568ea24c5a6d1b64a3c2cda3",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.0009578,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014745e303dc3ded3cf4407bff76bb287f3c05df1c8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.001,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
128
tests/rpc/testdata/bitcoin_testnet.json
vendored
128
tests/rpc/testdata/bitcoin_testnet.json
vendored
@ -1,128 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1325168,
|
||||
"blockHash": "000000000000004ed0834f3de922e66d024ec4da9fcc2da17be61369cb6dc041",
|
||||
"blockTime": 1528788394,
|
||||
"blockTxs": [
|
||||
"e1179f205aabbf48dc2ce4ebd9ed255571b0578e4de551f6574a50cb81120007",
|
||||
"00a5aa2891d41af9eb1dc30c940f142a609ecab8f370eb0874ba7d32252d1b1b",
|
||||
"1c519d80804dd17258cfc801bf2c875607956fc9f065a664f43e88d53f80af6f",
|
||||
"b10c1e2f7c8a6b10fddf94260aff0f8a5f56e33c8d0de48c49a72eb8418c3f6e",
|
||||
"ba85ca543b290deb84cde9c4ca53614dbe557a3dede5d0adb141f803f8e82f34",
|
||||
"60dfc2c9cc184ae68ca9e540ab4393d9d2179d060e2ac290f29560c6a1360f51",
|
||||
"3a40bca678653ae8f7f6d2771b571d5ace1a258056b99e3fd361a10f1016bc53",
|
||||
"4d4e495f3329801d92c7e3dc9874a372576bf3548decf884ede388143980ecab",
|
||||
"74ba4bee8d559e4d8b4859c086b0ea5f2c36bcabc95d8578e775f065f70943b8",
|
||||
"32bcc281f081e172dcb40ad137564724bd9486095813b78990d1d986173ac3c6",
|
||||
"b6e77c59f4a988731d9b8520e0f4971223e622946eb12e28cc2bab72f1e9c2f8",
|
||||
"0bc8f39da5d5300a2728b45edb18c8219e94a8b27a2e8074f6c5c10a00d99788",
|
||||
"8329b31d2a490d57980afcf5c7df4574ce57f952aef6f5aecb3b7786f5c9f255",
|
||||
"e559c2fd0f4e8aebe28fcb6dbb099fc6ee92d726d74fda28522f52bc1490a470",
|
||||
"3005378ee85fc905a1812bdfae4b2e0e9bb09f5867a53fd73237bb319a1774aa",
|
||||
"ebea245b9e4d96fab65c938547a9b3ffd03659b92b8ae4fcdfe4ac9bc325c0a2",
|
||||
"a2d5fe23b50253dda9941dd6c97c04853d58f048acf347acf9ccf549ee215b51",
|
||||
"017c2ccec866850521db877c1c7f6d095b7df668f891cfaf70a5e14ce39d010c",
|
||||
"d101d3467a831cc4dfc87bdd19d0ff5d01b8c872e47b2096eeeac3b44c2a258a",
|
||||
"3884180bab62d0f0498a8ad012b0005aceec778a18a617e5392d99cee5f21869",
|
||||
"a00200e57bed4fbd193c4cad49549d311282fee9a82956083353a2874f9bfd9f",
|
||||
"d32ce7a9413111fb2e3578472d520eb1437db701f20256e3afd37b7c0a6d67e6",
|
||||
"fed1df6d23a40e1a1f26820bbe35febb668aa2240902f1fd17b31a84dde6eb39",
|
||||
"5bef621ad6d0970939ae36270a3228d3c315f8008fb04eebffab5f7a3589d114",
|
||||
"411e7f3f4cae4125c8933403809771ebfcaa088f6ef773e5a412ead8639fb515",
|
||||
"d53858bbbbde4518ea92abda93ac5d01e5122d420a468e6d076244edd99bcea1",
|
||||
"b5fc4d963805b439d11f06b5d5d89ce3aac225e7145d1673d20d3d37a12c61dd",
|
||||
"c8d7332377d4bf43c232bc7afc3d7e3aacf13523d1c8488f68f530e58e6cfd88",
|
||||
"3c21a6b7e3810ca10efac45446cd2b7ef0c9848ac589be7375b61ea5aabbbea4",
|
||||
"5a25c2b70e2194e05a6208c99343ebe0fad970dd19f3f9cca88aaf77ab9e4658",
|
||||
"031e3c08ebdcafccf6dc5d7ff1161cd5314424d0a943d2c22a5a2109286e332d",
|
||||
"4992d16008aa3050b3e2e4aab67e488eb338850ff1c348367ae3d089d8d67a52",
|
||||
"beb3e71b8da7da7917228f5ce8a88afdc45836c421b053dde24d367865326bd7"
|
||||
],
|
||||
"txDetails": {
|
||||
"e559c2fd0f4e8aebe28fcb6dbb099fc6ee92d726d74fda28522f52bc1490a470": {
|
||||
"hex": "01000000000102a4b8c14f271cfa77d5ecaed9c3026472a55ea6bca119e2ff7b04975326f5974001000000171600147edbcdda98080eeb6e8a63c63da135498295c3cdffffffffabcdf96b8ba187c24d70f98a2edfbf100821506212637f28b30a08efa970a4eb0100000017160014df7d60680e984aae4052e24bce8f17e4bfdcc532ffffffff0292fe1e00000000001976a914abba3808b854c70b63ff038fcddfbafcb707713988ac13e796110100000017a914c9e67d2b78a38857c786ea9a2fc3e64cb6e775648702483045022100a6910d3a3b64545a44e097a3739b1206095602fa796afc51f81b249d1293ad0a02206cdae51853b59ca52003f4e54ea8ae418b6b4d036cbe1fdd78677efe8eddb318012102b45e239d96f8504ae45a32af7c80f6164f7b9658166e318521ee822192fee3ef0247304402202684a6f59ee255f3f5e9a9209a735bf2aaa818d47add7c3f7a5590623bd2211c0220452bf2fb8d0dc0380862988f0f098c21e861004e02da7bd1fc6bea4e7f33d2dc012103f308867fda821467f77d372791644225174ae16daba86e55754c150a8d5aa40d00000000",
|
||||
"txid": "e559c2fd0f4e8aebe28fcb6dbb099fc6ee92d726d74fda28522f52bc1490a470",
|
||||
"blocktime": 1528788394,
|
||||
"time": 1528788394,
|
||||
"locktime": 0,
|
||||
"vsize": 259,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "4097f5265397047bffe219a1bca65ea5726402c3d9aeecd577fa1c274fc1b8a4",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "1600147edbcdda98080eeb6e8a63c63da135498295c3cd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "eba470a9ef080ab3287f63126250210810bfdf2e8af9704dc287a18b6bf9cdab",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "160014df7d60680e984aae4052e24bce8f17e4bfdcc532"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.0203125,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914abba3808b854c70b63ff038fcddfbafcb707713988ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 45.90069523,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914c9e67d2b78a38857c786ea9a2fc3e64cb6e7756487"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"3005378ee85fc905a1812bdfae4b2e0e9bb09f5867a53fd73237bb319a1774aa": {
|
||||
"hex": "01000000000102c997f74e9ad52a44446302381e0fa6de080dadadf55842588bde1be8a47b438000000000171600147edbcdda98080eeb6e8a63c63da135498295c3cdffffffff563c9674a40bf1aa1063f767a50d2288146116fe869012ad3dad03d71e74a8800100000017160014af97d082fd5de049bce2991d9dcaa5d3035a1b04ffffffff0290f4f700000000001976a914abba3808b854c70b63ff038fcddfbafcb707713988ac74b77b030100000017a914fb1e0f36e2d8e91a43c7faba7dae18a610070c4a87024730440220538fcd8fbbf39b813372a7ff6251f1d22c9e940f54272ab525e1d1dc5f03049b022066cc5a1c445573e7e069fdaf3aa33d6665ef5f7936cb155cfd9093e888ca9461012102b45e239d96f8504ae45a32af7c80f6164f7b9658166e318521ee822192fee3ef0248304502210089e579ce52f765c8de6033e1cee93c94aa9a5ef3a194fec12885ed163dc60688022050aadd6aa170c6cfb58f406497949b0140327b4889ca7e082bdcfa8cc03d487f012103fb1a838f38d587dea0532f4a15a39b96e411cdb37c5160ba576a4cb0072db01900000000",
|
||||
"txid": "3005378ee85fc905a1812bdfae4b2e0e9bb09f5867a53fd73237bb319a1774aa",
|
||||
"blocktime": 1528788394,
|
||||
"time": 1528788394,
|
||||
"locktime": 0,
|
||||
"vsize": 259,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "80437ba4e81bde8b584258f5adad0d08dea60f1e38026344442ad59a4ef797c9",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "1600147edbcdda98080eeb6e8a63c63da135498295c3cd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "80a8741ed703ad3dad129086fe16611488220da567f76310aaf10ba474963c56",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "160014af97d082fd5de049bce2991d9dcaa5d3035a1b04"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.1625,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914abba3808b854c70b63ff038fcddfbafcb707713988ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 43.53406836,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914fb1e0f36e2d8e91a43c7faba7dae18a610070c4a87"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
46
tests/rpc/testdata/bitcore.json
vendored
46
tests/rpc/testdata/bitcore.json
vendored
@ -1,46 +0,0 @@
|
||||
{
|
||||
"blockHeight": 326137,
|
||||
"blockHash": "e55c2494163b9c0fa52fdc94deaf69edb9c391c0de8831b036c84a5576e9bb4d",
|
||||
"blockTime": 1547896069,
|
||||
"blockTxs": [
|
||||
"a64bb0b727a8c726773f4d90c8844e4d67723002a02d0640dec9d6df81b1b8c0",
|
||||
"77d9f84476e40fa48b2206e734f718d35dfd86911b945944ee05160699739c8b",
|
||||
"fcd4f2e45787a33571bc9b2ce939d6e8e51fa053296de9240f05455702bd9540"
|
||||
],
|
||||
"txDetails": {
|
||||
"fcd4f2e45787a33571bc9b2ce939d6e8e51fa053296de9240f05455702bd9540": {
|
||||
"hex": "0200000001f69bd1fd76e52a426f21332e3b7cfbc3350eacbd21c6e0c11a7ae11919803ef0010000006b483045022100d1fa62b9d7860a03e1dcd4734fe42457cb508ebb49e896d7a77748d997d09fba022005f1657b39451afe97076d8667fe5f6f18ca76391521ab84d09d5b82137d933b0121035aaf032f13761f27465467dc73f1998a80dd4d85a6353d2832a7244d7b591d3effffffff02a87322b3010000001976a914d0c320db3fbd0abe2b6fe31a3bca4fed8ce8669588ac94b94f37000000001976a9145584ee07090af59938e991c9d8e9e945c99a449f88ac00000000",
|
||||
"txid": "fcd4f2e45787a33571bc9b2ce939d6e8e51fa053296de9240f05455702bd9540",
|
||||
"blocktime": 1547896069,
|
||||
"time": 1547896069,
|
||||
"locktime": 0,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "f03e801919e17a1ac1e0c621bdac0e35c3fb7c3b2e33216f422ae576fdd19bf6",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100d1fa62b9d7860a03e1dcd4734fe42457cb508ebb49e896d7a77748d997d09fba022005f1657b39451afe97076d8667fe5f6f18ca76391521ab84d09d5b82137d933b0121035aaf032f13761f27465467dc73f1998a80dd4d85a6353d2832a7244d7b591d3e"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 73.00346792,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914d0c320db3fbd0abe2b6fe31a3bca4fed8ce8669588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 9.27971732,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9145584ee07090af59938e991c9d8e9e945c99a449f88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
45
tests/rpc/testdata/bitzeny.json
vendored
45
tests/rpc/testdata/bitzeny.json
vendored
@ -1,45 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1851162,
|
||||
"blockHash": "0000000050a2ab1816b07e63ee9faf8cefbb44a65192e1c5a7360c41efd1d1ef",
|
||||
"blockTime": 1583392607,
|
||||
"blockTxs": [
|
||||
"e55b40c050117cf6cb2e1f35772c00bdc33a1fb8473bca0e3ff99b0e88c70397",
|
||||
"f81c34b300961877328c3aaa7cd5e69068457868309fbf1e92544e3a6a915bcb"
|
||||
],
|
||||
"txDetails": {
|
||||
"f81c34b300961877328c3aaa7cd5e69068457868309fbf1e92544e3a6a915bcb": {
|
||||
"hex": "0100000001aef422fb91cd91e556966fed4121ac44017a761d71385596536bb447ae05213e000000006a47304402202341ac4297925257dc72eb418a069c45e76f7070340e27501f6308cc7eff45f802204a347915adceff5f6fc9b8075d95d47887d46b344c7bbc8066d315931b189ad001210228c2520812b7f8c63e7a088c61b6348b22fa0c98812e736a1fd896bc828d3c65feffffff028041f13d000000001976a91478379ea136bb5783b675cd11e412bf0703995aeb88aca9983141000000001976a9144d869697281ad18370313122795e56dfdc3a331388ac193f1c00",
|
||||
"txid": "f81c34b300961877328c3aaa7cd5e69068457868309fbf1e92544e3a6a915bcb",
|
||||
"blocktime": 1583392607,
|
||||
"time": 1583392607,
|
||||
"locktime": 1851161,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "3e2105ae47b46b53965538711d767a0144ac2141ed6f9656e591cd91fb22f4ae",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202341ac4297925257dc72eb418a069c45e76f7070340e27501f6308cc7eff45f802204a347915adceff5f6fc9b8075d95d47887d46b344c7bbc8066d315931b189ad001210228c2520812b7f8c63e7a088c61b6348b22fa0c98812e736a1fd896bc828d3c65"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 10.39221120,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91478379ea136bb5783b675cd11e412bf0703995aeb88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 10.93769385,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9144d869697281ad18370313122795e56dfdc3a331388ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
56
tests/rpc/testdata/bsc.json
vendored
56
tests/rpc/testdata/bsc.json
vendored
@ -1,56 +0,0 @@
|
||||
{
|
||||
"blockHeight": 12823819,
|
||||
"blockHash": "0x13a36aea55df099a02f777980840fc82dd0a6748fd1245a5185ec4401fdc196c",
|
||||
"blockTime": 1637466737,
|
||||
"blockSize": 945,
|
||||
"blockTxs": [
|
||||
"0x970fec39c96e92669d68ac2366ffe9dab7314eefc075f1db760a9792a8bffa12",
|
||||
"0x05618ba2e7e98c6cb3a9d05e6e62c0983b430103c69f1045608e812730bd61fc"
|
||||
],
|
||||
"txDetails": {
|
||||
"0x970fec39c96e92669d68ac2366ffe9dab7314eefc075f1db760a9792a8bffa12": {
|
||||
"txid": "0x970fec39c96e92669d68ac2366ffe9dab7314eefc075f1db760a9792a8bffa12",
|
||||
"blockTime": 1637466737,
|
||||
"time": 1637466737,
|
||||
"vin": [
|
||||
{
|
||||
"addresses": [
|
||||
"0xd6f2815c885f3c628b99873cb0feb3b96df63163"
|
||||
]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 4,
|
||||
"scriptPubKey": {
|
||||
"addresses": [
|
||||
"0xfd53b1b4af84d59b20bf2c20ca89a6beeaa2c628"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"0x05618ba2e7e98c6cb3a9d05e6e62c0983b430103c69f1045608e812730bd61fc": {
|
||||
"txid": "0x05618ba2e7e98c6cb3a9d05e6e62c0983b430103c69f1045608e812730bd61fc",
|
||||
"blockTime": 1637466737,
|
||||
"time": 1637466737,
|
||||
"vin": [
|
||||
{
|
||||
"addresses": [
|
||||
"0x295e26495cef6f69dfa69911d9d8e4f3bbadb89b"
|
||||
]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00206658,
|
||||
"scriptPubKey": {
|
||||
"addresses": [
|
||||
"0x0000000000000000000000000000000000001000"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
56
tests/rpc/testdata/bsc_archive.json
vendored
56
tests/rpc/testdata/bsc_archive.json
vendored
@ -1,56 +0,0 @@
|
||||
{
|
||||
"blockHeight": 12823819,
|
||||
"blockHash": "0x13a36aea55df099a02f777980840fc82dd0a6748fd1245a5185ec4401fdc196c",
|
||||
"blockTime": 1637466737,
|
||||
"blockSize": 945,
|
||||
"blockTxs": [
|
||||
"0x970fec39c96e92669d68ac2366ffe9dab7314eefc075f1db760a9792a8bffa12",
|
||||
"0x05618ba2e7e98c6cb3a9d05e6e62c0983b430103c69f1045608e812730bd61fc"
|
||||
],
|
||||
"txDetails": {
|
||||
"0x970fec39c96e92669d68ac2366ffe9dab7314eefc075f1db760a9792a8bffa12": {
|
||||
"txid": "0x970fec39c96e92669d68ac2366ffe9dab7314eefc075f1db760a9792a8bffa12",
|
||||
"blockTime": 1637466737,
|
||||
"time": 1637466737,
|
||||
"vin": [
|
||||
{
|
||||
"addresses": [
|
||||
"0xd6f2815c885f3c628b99873cb0feb3b96df63163"
|
||||
]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 4,
|
||||
"scriptPubKey": {
|
||||
"addresses": [
|
||||
"0xfd53b1b4af84d59b20bf2c20ca89a6beeaa2c628"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"0x05618ba2e7e98c6cb3a9d05e6e62c0983b430103c69f1045608e812730bd61fc": {
|
||||
"txid": "0x05618ba2e7e98c6cb3a9d05e6e62c0983b430103c69f1045608e812730bd61fc",
|
||||
"blockTime": 1637466737,
|
||||
"time": 1637466737,
|
||||
"vin": [
|
||||
{
|
||||
"addresses": [
|
||||
"0x295e26495cef6f69dfa69911d9d8e4f3bbadb89b"
|
||||
]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00206658,
|
||||
"scriptPubKey": {
|
||||
"addresses": [
|
||||
"0x0000000000000000000000000000000000001000"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
107
tests/rpc/testdata/cpuchain.json
vendored
107
tests/rpc/testdata/cpuchain.json
vendored
@ -1,107 +0,0 @@
|
||||
{
|
||||
"blockHeight":79960,
|
||||
"blockHash":"000000058e4ea8b9f687b4e40c32664fd328d8fcc7fe767d7436967c60f29b3f",
|
||||
"blockTime":1567264853,
|
||||
"blockTxs":[
|
||||
"f960f14ac5fd9dbeda393a7ba308760d3864a486d1966fde56acfeda695e8bf4",
|
||||
"c763ddc42f825ac090e12c77dd7705575b95e3fe53066ec90bb00627002f9916"
|
||||
],
|
||||
"txDetails":{
|
||||
"c763ddc42f825ac090e12c77dd7705575b95e3fe53066ec90bb00627002f9916":{
|
||||
"hex":"020000000512bdfdaa2164052fca8f7f112e61005a39c9f27a3fd6a3afc695102da749c550020000006a473044022044c3d2f6d7380486ccc2923761fbf064779fe03b726e6834caf942a4ec01c2d8022075aaeaf6cb76d548c99906a24197b733e85512f18bf6347452f4892ddee382eb012102da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05cfeffffff4bb9c45ef8dc996a5b3172481e7b68600bc38dabdb1d750a7798e5a05c4aa817040000006b483045022100bf1371418cc82702a60b2782dc832043b11ed13ec20fff156708a1d9da2390a20220091631b14b18f076479ab0f22d65bf2fde8bb574e800551dd69439db57cf511c012102be7ec4f4772cf0a54183f8c6b170d17f854a614d49e2d1072c6e2c25f34f5ef8feffffff5d8447c42f04714c066b17cf55b3323fb5674ad0d41b06dfb4b44e8a231260ce020000006b483045022100a397899722f20c42a647c6c95a8c1ef96868b3c19aef2e9666048067620a8e4702204c7bad050479588fc7f0bfa1a641f764e971fb532352e58ab7c8b4d4dea2baee012102da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05cfeffffffab71308f8af6439455c71a42f7406556e46f4c87478b5a84bd60bdd50747f0a9000000006b4830450221009c5dd8c78cdde9cbdce0c9a1d8f7696b162a3a6d61b49df24e3e02b0339947aa022064f77a50c616461b8e7d1a09e803ab414f7bf050ab062c4bd09217d7bb064b35012102a2422079534414b9e4727501ccece9306a9fe0fb27da2cfcf6d07f5067f27299feffffffea09f641971cac2659f64653b8654fb0cec8461c8adc2ea882cefccb15094d35020000006a47304402200cc2a4e25703b0e6f7e7922a159f6851a6005336ede5ba29c383ede90656a19d02203bbedf68938ef13459967e8141a45bc1948f840f67bf5e3219db3a5394349c48012102da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05cfeffffff0315cdfa3b000000001976a9149d79bcf021069e941857bdff8388c25011ba626a88acedad2f00000000001976a914765e478e7fc803d1c34310bfa99aefc05de2cc8088acaa6b663c000000001976a91467c0bd18101fc3ea9ce371eae467e0b235b4eca288ac0c380100",
|
||||
"txid":"c763ddc42f825ac090e12c77dd7705575b95e3fe53066ec90bb00627002f9916",
|
||||
"blocktime":1567264853,
|
||||
"time":1567264853,
|
||||
"locktime":79884,
|
||||
"version":2,
|
||||
"vin":[
|
||||
{
|
||||
"txid":"50c549a72d1095c6afa3d63f7af2c9395a00612e117f8fca2f056421aafdbd12",
|
||||
"vout":2,
|
||||
"scriptSig":{
|
||||
"asm":"3044022044c3d2f6d7380486ccc2923761fbf064779fe03b726e6834caf942a4ec01c2d8022075aaeaf6cb76d548c99906a24197b733e85512f18bf6347452f4892ddee382eb[ALL] 02da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05c",
|
||||
"hex":"473044022044c3d2f6d7380486ccc2923761fbf064779fe03b726e6834caf942a4ec01c2d8022075aaeaf6cb76d548c99906a24197b733e85512f18bf6347452f4892ddee382eb012102da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05c"
|
||||
},
|
||||
"sequence":4294967294
|
||||
},
|
||||
{
|
||||
"txid":"17a84a5ca0e598770a751ddbab8dc30b60687b1e4872315b6a99dcf85ec4b94b",
|
||||
"vout":4,
|
||||
"scriptSig":{
|
||||
"asm":"3045022100bf1371418cc82702a60b2782dc832043b11ed13ec20fff156708a1d9da2390a20220091631b14b18f076479ab0f22d65bf2fde8bb574e800551dd69439db57cf511c[ALL] 02be7ec4f4772cf0a54183f8c6b170d17f854a614d49e2d1072c6e2c25f34f5ef8",
|
||||
"hex":"483045022100bf1371418cc82702a60b2782dc832043b11ed13ec20fff156708a1d9da2390a20220091631b14b18f076479ab0f22d65bf2fde8bb574e800551dd69439db57cf511c012102be7ec4f4772cf0a54183f8c6b170d17f854a614d49e2d1072c6e2c25f34f5ef8"
|
||||
},
|
||||
"sequence":4294967294
|
||||
},
|
||||
{
|
||||
"txid":"ce6012238a4eb4b4df061bd4d04a67b53f32b355cf176b064c71042fc447845d",
|
||||
"vout":2,
|
||||
"scriptSig":{
|
||||
"asm":"3045022100a397899722f20c42a647c6c95a8c1ef96868b3c19aef2e9666048067620a8e4702204c7bad050479588fc7f0bfa1a641f764e971fb532352e58ab7c8b4d4dea2baee[ALL] 02da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05c",
|
||||
"hex":"483045022100a397899722f20c42a647c6c95a8c1ef96868b3c19aef2e9666048067620a8e4702204c7bad050479588fc7f0bfa1a641f764e971fb532352e58ab7c8b4d4dea2baee012102da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05c"
|
||||
},
|
||||
"sequence":4294967294
|
||||
},
|
||||
{
|
||||
"txid":"a9f04707d5bd60bd845a8b47874c6fe4566540f7421ac7559443f68a8f3071ab",
|
||||
"vout":0,
|
||||
"scriptSig":{
|
||||
"asm":"30450221009c5dd8c78cdde9cbdce0c9a1d8f7696b162a3a6d61b49df24e3e02b0339947aa022064f77a50c616461b8e7d1a09e803ab414f7bf050ab062c4bd09217d7bb064b35[ALL] 02a2422079534414b9e4727501ccece9306a9fe0fb27da2cfcf6d07f5067f27299",
|
||||
"hex":"4830450221009c5dd8c78cdde9cbdce0c9a1d8f7696b162a3a6d61b49df24e3e02b0339947aa022064f77a50c616461b8e7d1a09e803ab414f7bf050ab062c4bd09217d7bb064b35012102a2422079534414b9e4727501ccece9306a9fe0fb27da2cfcf6d07f5067f27299"
|
||||
},
|
||||
"sequence":4294967294
|
||||
},
|
||||
{
|
||||
"txid":"354d0915cbfcce82a82edc8a1c46c8ceb04f65b85346f65926ac1c9741f609ea",
|
||||
"vout":2,
|
||||
"scriptSig":{
|
||||
"asm":"304402200cc2a4e25703b0e6f7e7922a159f6851a6005336ede5ba29c383ede90656a19d02203bbedf68938ef13459967e8141a45bc1948f840f67bf5e3219db3a5394349c48[ALL] 02da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05c",
|
||||
"hex":"47304402200cc2a4e25703b0e6f7e7922a159f6851a6005336ede5ba29c383ede90656a19d02203bbedf68938ef13459967e8141a45bc1948f840f67bf5e3219db3a5394349c48012102da1d08a1d68dcba32bb2219ec6f80a7fdf2fab8ca9f5b8156a2b21fb36a2b05c"
|
||||
},
|
||||
"sequence":4294967294
|
||||
}
|
||||
],
|
||||
"vout":[
|
||||
{
|
||||
"value":10.06292245,
|
||||
"n":0,
|
||||
"scriptPubKey":{
|
||||
"asm":"OP_DUP OP_HASH160 9d79bcf021069e941857bdff8388c25011ba626a OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex":"76a9149d79bcf021069e941857bdff8388c25011ba626a88ac",
|
||||
"reqSigs":1,
|
||||
"type":"pubkeyhash",
|
||||
"addresses":[
|
||||
"CWpYVfaHU1ZxEujGeVZDJ6LwzEQEBiRdSm"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value":0.03124717,
|
||||
"n":1,
|
||||
"scriptPubKey":{
|
||||
"asm":"OP_DUP OP_HASH160 765e478e7fc803d1c34310bfa99aefc05de2cc80 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex":"76a914765e478e7fc803d1c34310bfa99aefc05de2cc8088ac",
|
||||
"reqSigs":1,
|
||||
"type":"pubkeyhash",
|
||||
"addresses":[
|
||||
"CTFmFLGWaMjKcKXVy7MDWGEWUJehtErLTV"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value":10.13345194,
|
||||
"n":2,
|
||||
"scriptPubKey":{
|
||||
"asm":"OP_DUP OP_HASH160 67c0bd18101fc3ea9ce371eae467e0b235b4eca2 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex":"76a91467c0bd18101fc3ea9ce371eae467e0b235b4eca288ac",
|
||||
"reqSigs":1,
|
||||
"type":"pubkeyhash",
|
||||
"addresses":[
|
||||
"CRvV4Wscfy8DovLt154patEBTwyzwWoxqr"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
60
tests/rpc/testdata/dash.json
vendored
60
tests/rpc/testdata/dash.json
vendored
@ -1,60 +0,0 @@
|
||||
{
|
||||
"blockHeight": 894503,
|
||||
"blockHash": "0000000000000026e2b7c7bb478f0ee846dd976ac6b97c3f3f7c8c65beab88a4",
|
||||
"blockTime": 1530189699,
|
||||
"blockTxs": [
|
||||
"6ea3a7fee4c40170d8782719d6fbeafd4cabb830f880d91bcf34811ad79e57bb",
|
||||
"c269940d8e46d94ff61a4adec8aa6dfb13803723a95a5b61c7831d3aea308cbc",
|
||||
"311d88d267dc099aacaeefba86770918d1f64c2b3f0db740336c48443d76930a",
|
||||
"8fb04b7aa96faf585395160165b8aca332033b8eded505092aaca0e06805ba10",
|
||||
"e28b7241432cc9ed3ec57136b662b354a6b32a08b8c2b265aebc08e8cc3578a5",
|
||||
"677a619d342262fee2ade09a03318322c15b40878583975794d39c63a1e8584f",
|
||||
"5f2aeacf8a93a7f8410839270eb6a94f659e5eef66e757b4e9ffe58c49cad0b9",
|
||||
"b56c423e9a84abb50c145591788f1e2539aa6f7dde52ab700b45149546a78670",
|
||||
"37478c09354bcdd650505e325699732d4c6aaec87f6bd696a59f1336b153a3d7",
|
||||
"8be9dc7f41aa982f70ba90281564265e1f92f7bcfc9c75c1e2c9abbbd1a81e87",
|
||||
"b85d5809e16100937072c88fc888206079c7105e1acc752159b6fe795332eb83",
|
||||
"ad2488e0604eb39ffac7ae0eee32ab4e2e97d2f25547d25d25865f512236e683",
|
||||
"62d1a3634b10512d1df5282d785bbcc765af3bbdf21490927f2881293d01636f",
|
||||
"5608945bf9bb1ed422b3eb03719aa9a067238d60b2e832ee107e63a9baba5045",
|
||||
"173badd5c5eedf889868b27e627d301d7e47dcbf3ced3f9caafa958d0c29bc3e",
|
||||
"452237bb02aee6dbca4952e2d9f51ba475a7c1b09ab01bf649b72735610fbf2a",
|
||||
"e7186be218879aea9ea32dc8e2ae63f390c7fcb9b755de1218935919f9377626"
|
||||
],
|
||||
"txDetails": {
|
||||
"311d88d267dc099aacaeefba86770918d1f64c2b3f0db740336c48443d76930a": {
|
||||
"hex": "010000000123bd8250d890b3150559a2cc761e50e62440453ca3e24f34a19e088ca82488a7010000006b483045022100b1aa32099a83bfb0c2d0b081eac5ecc8b6e49fac08aebdce025ef43c74615ca002203105c02194805f00c8ac746f1b19e71b4fc4c8ddf214a61e0db543da7099e6d3012103c064d95430c38e9db6d9305075c32dbc22c24a108d8e5be47a74e0b67845debcfeffffff0264d5fb00000000001976a91456354204e7505cb7f4de7c37ffb32ff25b41cd6c88acd4205a03000000001976a914f32332d32e254176014b41872dadd0f1e6d8378688ac00000000",
|
||||
"txid": "311d88d267dc099aacaeefba86770918d1f64c2b3f0db740336c48443d76930a",
|
||||
"blocktime": 1530189699,
|
||||
"time": 1530189699,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "a78824a88c089ea1344fe2a33c454024e6501e76cca2590515b390d85082bd23",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b1aa32099a83bfb0c2d0b081eac5ecc8b6e49fac08aebdce025ef43c74615ca002203105c02194805f00c8ac746f1b19e71b4fc4c8ddf214a61e0db543da7099e6d3012103c064d95430c38e9db6d9305075c32dbc22c24a108d8e5be47a74e0b67845debc"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.16504164,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91456354204e7505cb7f4de7c37ffb32ff25b41cd6c88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.56238292,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914f32332d32e254176014b41872dadd0f1e6d8378688ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
114
tests/rpc/testdata/dash_testnet.json
vendored
114
tests/rpc/testdata/dash_testnet.json
vendored
@ -1,114 +0,0 @@
|
||||
{
|
||||
"blockHeight": 139521,
|
||||
"blockHash": "000000000296ea05e13b5479f6c041de575eec90759f58f57d311a8918b0af17",
|
||||
"blockTime": 1528713762,
|
||||
"blockTxs": [
|
||||
"cfe2d2c5bd9929349a9d8f3d8f2423f4f0c9b408ed41b3002be5e7437a20aa7d",
|
||||
"3f7ac6c55c0b383feb17715aef3cebf29182039fc42577d7c517b2fc04096942",
|
||||
"3f296b929f6ee4f0ad3d6fce35873d6aeacbdf06aaf2abe384beb6e3f2a4dd03",
|
||||
"5ef4f9b7e4c0240687c3a6e6a073e0fbc753645d231ca35435b95325778b7186",
|
||||
"805b5ba055227b0f7dbbdef8e603632c4d25b93f0e87c59fc74cbe8ad8dbe806",
|
||||
"392785b88f03c82492172827f30cbed4761de3098a0faaa740999b412ff15e46",
|
||||
"13fafd7c8afc6fd2c860d342eaf0cfe0edd2b994bb836898c02830b2f688155e",
|
||||
"26bc95fcc71380f0d66e437314c72999c0848cab81fe1f91c9c95bf15b74855c",
|
||||
"7873d8d774f2aae72100620a21b38ea681b488b328802b6ec3271b1d727c6b73",
|
||||
"23147585fd4ed3970118027ce9b2e190e264f26fbf5d8c9708a483cee6cada43",
|
||||
"e079894b2545eca7184a2f0eaccf4b069242f18fa0721aedc8f66b73112a1e8f",
|
||||
"b36284854fa1947844ecc5d62768be3e14cc44c430db87b1b90184364b30dbf4",
|
||||
"1fd3ad5d0392cedf318600908270986c801cac161ef06f660591634cc2a29652",
|
||||
"7a5b8944589b0cfba9c408b24b095648b0040a37fd769a9785982603bb7ca1f7",
|
||||
"7da1811ec3f2c6381d89e59f40957d36c898ba1bb70b976e0b5490d3b9fa8952",
|
||||
"dbcfa65bdfe758353305eaff11b300463018efb7fa8f17c6c6a98bb8dba6bcc9",
|
||||
"c046821e5503770304359792c20c1ed3e71509a19a867acf1dae113bf52d2a6f",
|
||||
"d3cea11e1a4937323cc94172f93a2e0edc0981a706f2d2c3315ace94b01b375a",
|
||||
"6ef2a57e38dd891690c8f230b65f26247799b2421860e6cf8a1c7c8cfdedd96e",
|
||||
"53834414d8a88afe4268b85f959e526a0c677ac6b7dedba9a796d1549852fd41",
|
||||
"b761ebaccfb6d0eeaa5350ccafdf6a7633e59d6baadc932c6d78491cb08052a6"
|
||||
],
|
||||
"txDetails": {
|
||||
"3f7ac6c55c0b383feb17715aef3cebf29182039fc42577d7c517b2fc04096942": {
|
||||
"hex": "020000000109d37a59b7da8902b8822547c927e35554b16667ffd698daae985c58c71616a4010000006b483045022100f3ef92ae1c8442eff171bd2dbc69373db384c86617032917b3bb2c5cd892bb2702207485cf5f8e6aa9fe245f5708a5c6ec37580c1c35e54429c6b43b322678f54cad012102ba7dbd059cc4f03e9fa4b6007b407279a154a8fc2103241511df155a52b7ea58feffffff02a055e18e170000001976a914e2114cb0a8b5d6f1c3c720f314cbf79e14bb9cdd88ac8cb65df0440000001976a9141ed486862342afd134f96a6cee5ca105801375df88ac00210200",
|
||||
"txid": "3f7ac6c55c0b383feb17715aef3cebf29182039fc42577d7c517b2fc04096942",
|
||||
"blocktime": 1528713762,
|
||||
"time": 1528713762,
|
||||
"locktime": 139520,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "a41616c7585c98aeda98d6ff6766b15455e327c9472582b80289dab7597ad309",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100f3ef92ae1c8442eff171bd2dbc69373db384c86617032917b3bb2c5cd892bb2702207485cf5f8e6aa9fe245f5708a5c6ec37580c1c35e54429c6b43b322678f54cad012102ba7dbd059cc4f03e9fa4b6007b407279a154a8fc2103241511df155a52b7ea58"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1011.81380000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e2114cb0a8b5d6f1c3c720f314cbf79e14bb9cdd88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 2960.90449548,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9141ed486862342afd134f96a6cee5ca105801375df88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"6ef2a57e38dd891690c8f230b65f26247799b2421860e6cf8a1c7c8cfdedd96e": {
|
||||
"hex": "020000000327ee9a2a360c6304fda56fa029670a95db595f70ae185a6f76ff1de415e07a18000000006a473044022011e7aed7a1cf187a9b6ca294bb76e3576cadebce48b5b944ad8393a60e8aa485022000818546dc7ba47c625258223dcefd6e84dc3faa8d54c646bfc0f55c4506c8f00121023fe7680caadc7bf3f796936de04d77e1007dea53880621c01d7b34720345d4ecfeffffff1ae8beeed571f491410ed327a6821b683d8ae571aea56057634da7aa8ce1041f000000006b4830450221009277cfac065a076814e18613d89c7d85a6461cf5283f2a9cee7254ec83fce637022023cf7186be7714921fe24719450e65a204d803738a1cb9fe35f30753f0696b8b012102aff34da05a74891899aace72f2e650ec1c039bfc519c192e6c231a2b7fa05749feffffff6388454ad1e5718af92def6fe307e64e97c43324d30c322b31edf85088020dc9000000006a47304402204435602e00d22417ff489302758a246df5fbc05e9bc4d0025464556ae7f77e70022036e30d2d46937ee0fc0cdf9a63e7baf8351bd16454ec02311cac52655ac4c32801210395fbe30126fc97a2c8b1e29bc27028a5a6885e4a4116d13e2cbe32c9d71e7f03feffffff02ce177e09000000001976a91437617547a3e0ba0adeead7c8c33c03970341404088acd0f7aad1010000001976a914f0b3dff509993e0b7035ce997b52763ce501d67888ac00210200",
|
||||
"txid": "6ef2a57e38dd891690c8f230b65f26247799b2421860e6cf8a1c7c8cfdedd96e",
|
||||
"blocktime": 1528713762,
|
||||
"time": 1528713762,
|
||||
"locktime": 139520,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "187ae015e41dff766f5a18ae705f59db950a6729a06fa5fd04630c362a9aee27",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "473044022011e7aed7a1cf187a9b6ca294bb76e3576cadebce48b5b944ad8393a60e8aa485022000818546dc7ba47c625258223dcefd6e84dc3faa8d54c646bfc0f55c4506c8f00121023fe7680caadc7bf3f796936de04d77e1007dea53880621c01d7b34720345d4ec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "1f04e18caaa74d635760a5ae71e58a3d681b82a627d30e4191f471d5eebee81a",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009277cfac065a076814e18613d89c7d85a6461cf5283f2a9cee7254ec83fce637022023cf7186be7714921fe24719450e65a204d803738a1cb9fe35f30753f0696b8b012102aff34da05a74891899aace72f2e650ec1c039bfc519c192e6c231a2b7fa05749"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "c90d028850f8ed312b320cd32433c4974ee607e36fef2df98a71e5d14a458863",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402204435602e00d22417ff489302758a246df5fbc05e9bc4d0025464556ae7f77e70022036e30d2d46937ee0fc0cdf9a63e7baf8351bd16454ec02311cac52655ac4c32801210395fbe30126fc97a2c8b1e29bc27028a5a6885e4a4116d13e2cbe32c9d71e7f03"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1.59258574,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91437617547a3e0ba0adeead7c8c33c03970341404088ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 78.12610000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914f0b3dff509993e0b7035ce997b52763ce501d67888ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
100
tests/rpc/testdata/decred.json
vendored
100
tests/rpc/testdata/decred.json
vendored
@ -1,100 +0,0 @@
|
||||
{
|
||||
"blockHeight": 30000,
|
||||
"blockHash": "000000000000039135acfe97d4c769156856318997ff9afa6635873344b4e26f",
|
||||
"blockTime": 1463843967,
|
||||
"blockTxs": [
|
||||
"4cfab09f97f04e065f9a9552dcdda9ce1b2aabec436330adea330f0b5f7a359d",
|
||||
"fb422109aa8db4dafdd16a0e9c38d49a4ea448a3e739513d5aaf2cc056e366a6",
|
||||
"a768ec0314cde1e497893d6825f4780f5342e24a841c50d48189e540d3d08a2a",
|
||||
"7058766ffef2e9cee61ee4b7604a39bc91c3000cb951c4f93f3307f6e0bf4def",
|
||||
"ea66736c9488fee34d85042a6cfdb6c53a0b6da4a3b69f9014d9037ffc672173",
|
||||
"798b8a038b96719dddb544a82a9e626ea548353064e17541b3a4f4bf91663501",
|
||||
"8794b8c3b72fccddeb5acfb61fe8671de697a3e43d9111c59fc80b0890ff9ba9",
|
||||
"b285a6e33b3d1bdf329fa0d169a5ddb21c1e9517df021ecf5235c0ebfd21c6fc"
|
||||
],
|
||||
"blockSize": 5050,
|
||||
"txDetails": {
|
||||
"7058766ffef2e9cee61ee4b7604a39bc91c3000cb951c4f93f3307f6e0bf4def": {
|
||||
"hex": "0100000001193c189c71dff482b70ccb10ec9cf0ea3421a7fc51e4c7b0cf59c98a293a2f960200000000ffffffff027c87f00b0000000000001976a91418f10131a859912119c4a8510199f87f0a4cec2488ac9889495f0000000000001976a914631fb783b1e06c3f6e71777e16da6de13450465e88ac0000000000000000015ced3d6b0000000030740000000000006a47304402204e6afc21f6d065b9c082dad81a5f29136320e2b54c6cdf6b8722e4507e1a8d8902203933c5e592df3b0bbb0568f121f48ef6cbfae9cf479a57229742b5780dedc57a012103b89bb443b6ab17724458285b302291b082c59e5a022f273af0f61d47a414a537",
|
||||
"txid": "7058766ffef2e9cee61ee4b7604a39bc91c3000cb951c4f93f3307f6e0bf4def",
|
||||
"blocktime": 1463843967,
|
||||
"blockHeight": 30000,
|
||||
"time": 1463843967,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "962f3a298ac959cfb0c7e451fca72134eaf09cec10cb0cb782f4df719c183c19",
|
||||
"vout": 2,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402204e6afc21f6d065b9c082dad81a5f29136320e2b54c6cdf6b8722e4507e1a8d8902203933c5e592df3b0bbb0568f121f48ef6cbfae9cf479a57229742b5780dedc57a012103b89bb443b6ab17724458285b302291b082c59e5a022f273af0f61d47a414a537"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 2.003127,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91418f10131a859912119c4a8510199f87f0a4cec2488ac",
|
||||
"addresses": [
|
||||
"DsTEnRLDEjQNeQ4A47fdS2pqtaFrGNzkqNa"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 15.98654872,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914631fb783b1e06c3f6e71777e16da6de13450465e88ac",
|
||||
"addresses": [
|
||||
"Dsa12P9VnCd55hTnUXpvGgFKSeGkFkzRvYb"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"798b8a038b96719dddb544a82a9e626ea548353064e17541b3a4f4bf91663501": {
|
||||
"hex": "0100000001188e1dd0e4708b0921afdd75d013b7cd63f7952e558ceb1040f45681717a27100000000000ffffffff029eb7de050000000000001976a91437b2be41e6b04cc29e4421b2bc2f7ab31a8a926d88aca7eade600000000000001976a914c450e55bb7f766ce35f1c16c3ddbc8eefcc7719688ac0000000000000000018d7ec166000000002d750000020000006b483045022100dd83f7cf6832e78bcbaac959ee38833cf2da2bac537223d8d80c61ea1578716f02202aa925285793c372dc8dfe5ef4febdae94c853b8230443fbb61ef59805b229530121031d5fdebe075585f15d8dad8eecb62bdf5e5d8c353097ee08ed7c1a9bc0de0a77",
|
||||
"txid": "798b8a038b96719dddb544a82a9e626ea548353064e17541b3a4f4bf91663501",
|
||||
"blocktime": 1463843967,
|
||||
"blockHeight": 30000,
|
||||
"time": 1463843967,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "10277a718156f44010eb8c552e95f763cdb713d075ddaf21098b70e4d01d8e18",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100dd83f7cf6832e78bcbaac959ee38833cf2da2bac537223d8d80c61ea1578716f02202aa925285793c372dc8dfe5ef4febdae94c853b8230443fbb61ef59805b229530121031d5fdebe075585f15d8dad8eecb62bdf5e5d8c353097ee08ed7c1a9bc0de0a77"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.98482078,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91437b2be41e6b04cc29e4421b2bc2f7ab31a8a926d88ac",
|
||||
"addresses": [
|
||||
"DsW3QnGxXzyvZAvFbLeuDE53aWD55deJiBk"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 16.25221799,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914c450e55bb7f766ce35f1c16c3ddbc8eefcc7719688ac",
|
||||
"addresses": [
|
||||
"Dsirvqn2J4AzZSns3DpoB3iCzV8iWmspa9m"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
115
tests/rpc/testdata/decred_testnet.json
vendored
115
tests/rpc/testdata/decred_testnet.json
vendored
@ -1,115 +0,0 @@
|
||||
{
|
||||
"blockHeight": 18720,
|
||||
"blockHash": "00000000056aa5d3268088dd958da4aeb73586815a2974ef40a907ecbbf8893c",
|
||||
"blockTime": 1535980876,
|
||||
"blockTxs": [
|
||||
"47ceedca164da150ce1c677f6d6f1eae41b792d9c16a956204cc0dcbf8caa905",
|
||||
"0c7a348bbcc0da20ac5f304627e8154b90ed2b56ec828a5513bce0dd521713cc"
|
||||
],
|
||||
"blockSize": 2531,
|
||||
"txDetails": {
|
||||
"326e54f7909ef8b3d696367039c5eec67b505ef82c3edd2368dd39b6aa272dee": {
|
||||
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff03fbed9f0d00000000000017a914d585cd7426d25b4ea5faf1e6987aacfeda3db94287000000000000000000000e6a0c2049000039c63f0b763dfcffa145c0510000000000001976a9149bb0ab1ab455c220c575304aa6bb31dad3eff19888ac000000000000000001e0815f5f0000000000000000ffffffff0800002f646372642f",
|
||||
"blocktime": 1535980876,
|
||||
"time": 1535980876,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"blockindex": 4294967295,
|
||||
"coinbase": "00002f646372642f",
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 2.28584955,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914d585cd7426d25b4ea5faf1e6987aacfeda3db94287",
|
||||
"addresses": [
|
||||
"TcrypGAcGCRVXrES7hWqVZb5oLJKCZEtoL1"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "6a0c2049000039c63f0b763dfcff",
|
||||
"addresses": [
|
||||
"OP_RETURN 2049000039c63f0b763dfcff"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 13.71555233,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9149bb0ab1ab455c220c575304aa6bb31dad3eff19888ac",
|
||||
"addresses": [
|
||||
"TsfDLrRkk9ciUuwfp2b8PawwnukYD7yAjGd"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"5cf42c027886df5281df2d15fa876281a362ebb742efe963682258ef201d58d3": {
|
||||
"hex": "01000000022071ad6dd7c1f463d1cdd7bf15879397be44da6d98bf03c89d571eedf77ffc530200000001ffffffff39880e89917a590c0b010d87064812019e619048d2c4e8dbe8115048c067ecd50200000001ffffffff03cd1ecb340000000000001976a914ae99f28cb5e00dd88b1669c19995f5c84586c33388accd1ecb340000000000001976a914ae99f28cb5e00dd88b1669c19995f5c84586c33388ac1a0801070000000000001976a914fe3d3bc633ef2321d479332412b71ef6bc60e86a88ac000000000000000002362e54360000000010490000010000006b483045022100dbb703dea8c4fc87357be19a9af114242bc80c4eafa387d654da1a427c56cd6102207cb00d4fedbfaa4f2aa7b4530683e286ad13fe127dd9be5edee4c1cb594d9da401210372321040dccd62d5171718e49713a804ceb566fa65ea762a86e7b89e8448d0ed3ac9433a0000000010490000030000006a4730440220729ca901c17ef7008d32df19bfdedf91821d10f0a7511be4d78bdf1027f5598c022077c4a7df6388d1107927f9f95b6aca4b3fd02ae1ff2c422fe47ad79b51c42b64012103adde046e4f13579bba4104ec9b5064158df0ea6648876a8667d88c6abffc0e22",
|
||||
"blocktime": 1535980876,
|
||||
"time": 1535980876,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "53fc7ff7ed1e579dc803bf986dda44be97938715bfd7cdd163f4c1d76dad7120",
|
||||
"vout": 2,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100dbb703dea8c4fc87357be19a9af114242bc80c4eafa387d654da1a427c56cd6102207cb00d4fedbfaa4f2aa7b4530683e286ad13fe127dd9be5edee4c1cb594d9da401210372321040dccd62d5171718e49713a804ceb566fa65ea762a86e7b89e8448d0ed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "d5ec67c0485011e8dbe8c4d24890619e01124806870d010b0c597a91890e8839",
|
||||
"vout": 2,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220729ca901c17ef7008d32df19bfdedf91821d10f0a7511be4d78bdf1027f5598c022077c4a7df6388d1107927f9f95b6aca4b3fd02ae1ff2c422fe47ad79b51c42b64012103adde046e4f13579bba4104ec9b5064158df0ea6648876a8667d88c6abffc0e22"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 8.85726925,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914ae99f28cb5e00dd88b1669c19995f5c84586c33388ac",
|
||||
"addresses": [
|
||||
"TsgwLUPtU1PF6nFe6RohUdhwUURJX7bv5R1"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 8.85726925,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914ae99f28cb5e00dd88b1669c19995f5c84586c33388ac",
|
||||
"addresses": [
|
||||
"TsgwLUPtU1PF6nFe6RohUdhwUURJX7bv5R1"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.17508122,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914fe3d3bc633ef2321d479332412b71ef6bc60e86a88ac",
|
||||
"addresses": [
|
||||
"TspCRTrypUAyeE3yNqg6Wp1a2w9bmko3oED"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
52
tests/rpc/testdata/deeponion.json
vendored
52
tests/rpc/testdata/deeponion.json
vendored
@ -1,52 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1377592,
|
||||
"blockHash": "9993684c15a793130f43120839e5c2c711907631ef4ad7b43ba535322e4c6649",
|
||||
"blockTime": 1564554257,
|
||||
"blockTxs": [
|
||||
"200b681e57d19131a87c3aa4172b9e2e128cc48ecdf54cc91dcbc44e96e8f7cf",
|
||||
"6ba18524d81af732d0226ffdb63d2bcdc0d58a35ac97b5ad731057932d324e14"
|
||||
],
|
||||
"txDetails": {
|
||||
"e967e3be9b68bcbb5cf5db31816cd40574345a24e69807ee8a80a7f92baeca14": {
|
||||
"hex": "0100000015cc175d016012730925e8e7eaff1a7cbd18e255f749e936730c001ca4b900a9a93230abbd0100000048473044022066a828d9d7d3e03dba2ad028bfdcad4e989ab76f11a7a033702759c37525bd8502206480c14e3c39a1d244e00c4113557bd9651d8b2b944426d88f8d7f95f8957c5601ffffffff03000000000000000000c0be295804000000232102bdb95d89f07e3a29305f3c8de86ec211ed77b7e15cf314c85c532a6b71c2ce07acfbf73a5804000000232102bdb95d89f07e3a29305f3c8de86ec211ed77b7e15cf314c85c532a6b71c2ce07ac00000000",
|
||||
"txid": "e967e3be9b68bcbb5cf5db31816cd40574345a24e69807ee8a80a7f92baeca14",
|
||||
"blocktime": 1561840661,
|
||||
"time": 1561840661,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "bdab3032a9a900b9a41c000c7336e949f755e218bd7c1affeae7e82509731260",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "473044022066a828d9d7d3e03dba2ad028bfdcad4e989ab76f11a7a033702759c37525bd8502206480c14e3c39a1d244e00c4113557bd9651d8b2b944426d88f8d7f95f8957c5601"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 186.59,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "2102bdb95d89f07e3a29305f3c8de86ec211ed77b7e15cf314c85c532a6b71c2ce07ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 186.60128763,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "2102bdb95d89f07e3a29305f3c8de86ec211ed77b7e15cf314c85c532a6b71c2ce07ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
54
tests/rpc/testdata/digibyte.json
vendored
54
tests/rpc/testdata/digibyte.json
vendored
@ -1,54 +0,0 @@
|
||||
{
|
||||
"blockHeight": 7000000,
|
||||
"blockHash": "03c6664b250c3e3b688f5779ce791384b35acaa38c4461f0458a4674bd762f63",
|
||||
"blockTime": 1532239864,
|
||||
"blockTxs": [
|
||||
"759433255ce45b4bbc7a961767a14b383753ffa197e8228c29c16d7cf0008766",
|
||||
"d4fe2eea4e62b3705ac5fda29deeaaa4d2dea446077e4153ae84398c3d62ccb4"
|
||||
],
|
||||
"txDetails": {
|
||||
"d4fe2eea4e62b3705ac5fda29deeaaa4d2dea446077e4153ae84398c3d62ccb4": {
|
||||
"hex": "010000000203326d7375759a5863ea2cfb324a6c4201425dfd336a508900a804c22a51e125000000006a47304402200632ff38dc836b95e81f2022d2e39222c4261e85e64d909f53969d94c0febc9c022065000e5660744b699e9fb6f28a0a46e06b3870a2fe382f80c867e1ee3606056401210392091d4341e4b15692234ead7d374c4fa5dc636c30f0042526366ea70f5dc889feffffff3e2ed13beb3d3f34b0d9593c11c7d8e74e43bfe504426aea11626a09bda0fd9d000000006b4830450221009077f18dcbe30dda597f8a503414d443cb6e8ad45948df6d320e1fda9b1fd0b40220603dac961f16b86e9c65ab8c127f696192ffb6856705a4913c0c92c2d9f5a0f201210392091d4341e4b15692234ead7d374c4fa5dc636c30f0042526366ea70f5dc889feffffff02cd67b551000000001976a914035d5bd3df669b4a50839d004d4301d0edfa793c88acb7984525230000001976a9140f165c712e18717410e5ef952529dc470e34b73b88ac8ccf6a00",
|
||||
"txid": "d4fe2eea4e62b3705ac5fda29deeaaa4d2dea446077e4153ae84398c3d62ccb4",
|
||||
"blocktime": 1532239864,
|
||||
"time": 1532239864,
|
||||
"locktime": 6999948,
|
||||
"vsize": 373,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "25e1512ac204a80089506a33fd5d4201426c4a32fb2cea63589a7575736d3203",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402200632ff38dc836b95e81f2022d2e39222c4261e85e64d909f53969d94c0febc9c022065000e5660744b699e9fb6f28a0a46e06b3870a2fe382f80c867e1ee3606056401210392091d4341e4b15692234ead7d374c4fa5dc636c30f0042526366ea70f5dc889"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "9dfda0bd096a6211ea6a4204e5bf434ee7d8c7113c59d9b0343f3deb3bd12e3e",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009077f18dcbe30dda597f8a503414d443cb6e8ad45948df6d320e1fda9b1fd0b40220603dac961f16b86e9c65ab8c127f696192ffb6856705a4913c0c92c2d9f5a0f201210392091d4341e4b15692234ead7d374c4fa5dc636c30f0042526366ea70f5dc889"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 13.70843085,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914035d5bd3df669b4a50839d004d4301d0edfa793c88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1509.49173431,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9140f165c712e18717410e5ef952529dc470e34b73b88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
52
tests/rpc/testdata/divi.json
vendored
52
tests/rpc/testdata/divi.json
vendored
@ -1,52 +0,0 @@
|
||||
{
|
||||
"blockHeight": 430894,
|
||||
"blockHash": "ca642b4cebd715d7448066e72d9c1c9f7cc17a7c7275ce5732357f9ede6199c7",
|
||||
"blockTime": 1564178016,
|
||||
"blockTxs": [
|
||||
"c206fc61c6957c54f365e7416d57a7cb314674b64aa84443ffa9b6d196aca9d9",
|
||||
"877557968ae65d64e99d09170cd9548e8a309508596355cc264758ce8c483b4b"
|
||||
],
|
||||
"txDetails": {
|
||||
"877557968ae65d64e99d09170cd9548e8a309508596355cc264758ce8c483b4b": {
|
||||
"hex": "010000000175d0b5235b4786be686a50f04382c3e401a1e8aa1ba17e7c959a58ddd39efeaa010000006b483045022100e552531d4be4290438edc7e8c5d1e2b5548c1a76cd396dfa9423b0e55abb0c6a02203efc3f76133de9161ba787c5fd9ef4cffbfd0745cfea8cf3a3f6dd3bce9293d0012103961c8f7574f64a61087adf3057f394be8bdc33b7a8abcbc60a71f7477dbd52a1ffffffff03000000000000000000009bb81da10100001976a9143ae7ad31dc26934c71e61bbb3248fb509a5f5d5988ac009ca6920c0000001976a9140d570e6e31e046f05b26f8bd8b14adbc2e76f99988ac00000000",
|
||||
"txid": "877557968ae65d64e99d09170cd9548e8a309508596355cc264758ce8c483b4b",
|
||||
"blocktime": 1564178016,
|
||||
"time": 1564178016,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "aafe9ed3dd589a957c7ea11baae8a101e4c38243f0506a68be86475b23b5d075",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100e552531d4be4290438edc7e8c5d1e2b5548c1a76cd396dfa9423b0e55abb0c6a02203efc3f76133de9161ba787c5fd9ef4cffbfd0745cfea8cf3a3f6dd3bce9293d0012103961c8f7574f64a61087adf3057f394be8bdc33b7a8abcbc60a71f7477dbd52a1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"type": "nonstandard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 17915,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143ae7ad31dc26934c71e61bbb3248fb509a5f5d5988ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 540,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9140d570e6e31e046f05b26f8bd8b14adbc2e76f99988ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
54
tests/rpc/testdata/dogecoin.json
vendored
54
tests/rpc/testdata/dogecoin.json
vendored
@ -1,54 +0,0 @@
|
||||
{
|
||||
"blockHeight": 2000002,
|
||||
"blockHash": "6db0b6fc543cacbc4244f5fab23af56792a87eacc3149957a1922fd59d4d03e0",
|
||||
"blockTime": 1512601001,
|
||||
"blockTxs": [
|
||||
"cc3c92a9da8e28f18faf17efe74e96f541f03e3a300c55fef0c4dbc9e5b14c01",
|
||||
"cb3cb43e34385556c9617699687b15f3dbad57cb0e8548114b66c55512c51a52",
|
||||
"f6be02faa646a1ad764e4eb49fb6f02cbae69e5bc396a8977e59c7d887aa38b2",
|
||||
"79883da5f57c942feb922e4bb635af631219aae2e70037459b07840945d6466c",
|
||||
"23b5caddcb3c1222a0b97ff6f67185266b982465ef1a3546c7fc6ad8414ba7d0",
|
||||
"82cf9f6822362ecfc0d47cc6b7372862ef0fdd14b259c42c8f2def8589f266f0",
|
||||
"12a4e4daa6e3b842a2395c315f296f284ac2085e2f2fb4f356f94e08117963ba",
|
||||
"cc136353be3db35e051e5dd34ff29f9cfe47a7b3f6ab7383fd644bc00ab1e348",
|
||||
"f2db6749bc5f7e727f9e6c9a5553ad44dc59d9994dcadc24a57cf6042d1d07e7"
|
||||
],
|
||||
"txDetails": {
|
||||
"f6be02faa646a1ad764e4eb49fb6f02cbae69e5bc396a8977e59c7d887aa38b2": {
|
||||
"hex": "0100000002361742ebea8bdce921359dbe528b23cc8050dc86950fd07011a74258cd0215dde5030000db00483045022100885238254408979e8f44c087c06333376980a73594c4d51c8cdf457934514e34022026287952d554f9f9f24c0a47096cce0db53547099aa700a91fa9046eb5c4960801483045022100a4ce7700bdf654dfe2a4fc5796bd3466be6af3691dc263821d4c71f91f9d9d1e02200b988bea6bf9e7d44e9a4b8cee9e390c72d284e3df1aacf6ab23368560b3e53e0147522102a39a18546545ee2944481953c25b3a5f4942cd8ed533ae2daabb4339c68c599b210349ed7f7284feff2b9d0b3493fde313afcc63b41347592c435f5408852c9ea05d52aeffffffff85f2900e642720043fae056075b48ea83cbd3653797c40fb4e7e512938dcda7573020000da004730440220138a8dd272f3081e54b172fb3e6cf43fe5375369d7e93c310ceba852c22ba16f022050de068f932f6d6db9889a8d4e489ffeda2ed1848cd2a71a06d635e6d1799b8e01483045022100af99d412c97062219ef56c3c8ad99023feab94042d310f792392940c61df9bdd02200b4542395624412260c96c46427509c2b801df33e15da08c6c505594c7c142010147522102a39a18546545ee2944481953c25b3a5f4942cd8ed533ae2daabb4339c68c599b210349ed7f7284feff2b9d0b3493fde313afcc63b41347592c435f5408852c9ea05d52aeffffffff01c0ebf7b90100000017a9147541523df4d0d0875c024e1906b0d195abaf20958700000000",
|
||||
"txid": "f6be02faa646a1ad764e4eb49fb6f02cbae69e5bc396a8977e59c7d887aa38b2",
|
||||
"blocktime": 1512601001,
|
||||
"time": 1512601001,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vsize": 561,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "dd1502cd5842a71170d00f9586dc5080cc238b52be9d3521e9dc8beaeb421736",
|
||||
"vout": 997,
|
||||
"scriptSig": {
|
||||
"hex": "00483045022100885238254408979e8f44c087c06333376980a73594c4d51c8cdf457934514e34022026287952d554f9f9f24c0a47096cce0db53547099aa700a91fa9046eb5c4960801483045022100a4ce7700bdf654dfe2a4fc5796bd3466be6af3691dc263821d4c71f91f9d9d1e02200b988bea6bf9e7d44e9a4b8cee9e390c72d284e3df1aacf6ab23368560b3e53e0147522102a39a18546545ee2944481953c25b3a5f4942cd8ed533ae2daabb4339c68c599b210349ed7f7284feff2b9d0b3493fde313afcc63b41347592c435f5408852c9ea05d52ae"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "75dadc3829517e4efb407c795336bd3ca88eb4756005ae3f042027640e90f285",
|
||||
"vout": 627,
|
||||
"scriptSig": {
|
||||
"hex": "004730440220138a8dd272f3081e54b172fb3e6cf43fe5375369d7e93c310ceba852c22ba16f022050de068f932f6d6db9889a8d4e489ffeda2ed1848cd2a71a06d635e6d1799b8e01483045022100af99d412c97062219ef56c3c8ad99023feab94042d310f792392940c61df9bdd02200b4542395624412260c96c46427509c2b801df33e15da08c6c505594c7c142010147522102a39a18546545ee2944481953c25b3a5f4942cd8ed533ae2daabb4339c68c599b210349ed7f7284feff2b9d0b3493fde313afcc63b41347592c435f5408852c9ea05d52ae"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 74.15,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9147541523df4d0d0875c024e1906b0d195abaf209587"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
59
tests/rpc/testdata/dogecoin_testnet.json
vendored
59
tests/rpc/testdata/dogecoin_testnet.json
vendored
@ -1,59 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1000026,
|
||||
"blockHash": "1d817bb9494aae8937c7b2ee7328eed4518b91cfd5bb4308b14516530ea8c30b",
|
||||
"blockTime": 1495656473,
|
||||
"blockTxs": [
|
||||
"6a86882d6732cef2c2b87286cdfea028f57f8e46a444bc0745e4b7c758b8a987",
|
||||
"0c51e442d35946bf0e10ef321c5b2492bbe2c5e218a7e6fafaceb09496c3965f",
|
||||
"909c00caac5cb72df3bc3c198d6bb0d897f102834ea8621a6329bf5983fc22c5",
|
||||
"05d64a16beaf6604281efa28ee5449df8a58ad5a18528440ee89b9c28d062388",
|
||||
"9f6c0c98b3d61454e40d26746531e8278d55c0e19628bdc2829ceb3655719a39",
|
||||
"51d503e96dd4292a168f9b3958106ed5122f3d28aac279cfc14f05b720569a74",
|
||||
"135af3d89384d2e97aada23fcb53995642ded2afc52347cea15bbec1f1c2e39c",
|
||||
"c88637b70b11f3d7750bdc7cc30e446c0e7b4c595891a103083e3ff0da2a1f4c"
|
||||
],
|
||||
"txDetails": {
|
||||
"0c51e442d35946bf0e10ef321c5b2492bbe2c5e218a7e6fafaceb09496c3965f": {
|
||||
"hex": "0100000002f2abad3753e2e52be2de82f9c2b7e899237eee901f66c5dec22fbc16ef1cde2d010000006b483045022100fbee8b46d376d7cad5d6240a56cc9fc58a9bf6fba812abb3a6006fde1899bb750220386f11ff554966362a78a75cd56bf1708d2156f490384893300307cffefdad51012102991a76081c2513ba269f98c84ffa3d94d1a923858b4fe27f888e8cc8640fef03fffffffffdf846e9f59b30ebbd61fcdba290871611af468a61d663c0d89ad33cadae0acc010000006b483045022100bc9f869763ce4b16cb819a752f29a40e44b52230304a85550010f22b6b9a1aeb022032af127c7133257897c9c999a36bd1751870fca970e92c15163addd2679eb4d0012102991a76081c2513ba269f98c84ffa3d94d1a923858b4fe27f888e8cc8640fef03ffffffff0200d6117e030000001976a91477d527b839af5b9d2126de7df15908613d68b31188ac00275c0b120000001976a914a4cbacf5e85425abfaf2338b068351236e69807f88ac00000000",
|
||||
"txid": "0c51e442d35946bf0e10ef321c5b2492bbe2c5e218a7e6fafaceb09496c3965f",
|
||||
"blocktime": 1495656473,
|
||||
"time": 1495656473,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "2dde1cef16bc2fc2dec5661f90ee7e2399e8b7c2f982dee22be5e25337adabf2",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100fbee8b46d376d7cad5d6240a56cc9fc58a9bf6fba812abb3a6006fde1899bb750220386f11ff554966362a78a75cd56bf1708d2156f490384893300307cffefdad51012102991a76081c2513ba269f98c84ffa3d94d1a923858b4fe27f888e8cc8640fef03"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "cc0aaead3cd39ad8c063d6618a46af11168790a2dbfc61bdeb309bf5e946f8fd",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100bc9f869763ce4b16cb819a752f29a40e44b52230304a85550010f22b6b9a1aeb022032af127c7133257897c9c999a36bd1751870fca970e92c15163addd2679eb4d0012102991a76081c2513ba269f98c84ffa3d94d1a923858b4fe27f888e8cc8640fef03"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 150.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91477d527b839af5b9d2126de7df15908613d68b31188ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 775.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a4cbacf5e85425abfaf2338b068351236e69807f88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
92
tests/rpc/testdata/ecash.json
vendored
92
tests/rpc/testdata/ecash.json
vendored
@ -1,92 +0,0 @@
|
||||
{
|
||||
"blockHeight": 723621,
|
||||
"blockHash": "0000000000000000016ee40672952698db9a72054014077e8065d0ed3843be38",
|
||||
"blockTime": 1643027028,
|
||||
"blockTxs": [
|
||||
"79a716de966042dedb1294e662c4340fcc121f31fc67d4f37734b6838f7309c4",
|
||||
"1568e2fcf08ad3eaa0a004f2cb8ca2456ea4c624652843a04f727d984c1c5ea6",
|
||||
"6ddcf32bdc26f12200a3cc41d9d660bf0afc39ee3f1c94706e202373bcd782d6",
|
||||
"9057bdf099646b3f28498dd33302a28db5c3556e80593d506f45dfa240206c4b",
|
||||
"d19abd0ea6b2dfa745c1a194d87b0d621f3d55aa7e1bc53d9d2d7fe44f0e1226",
|
||||
"d864b206afccff0a37ce6a1bb697a6c6217c537760b291d832ad526a7d94b270",
|
||||
"ff7cdcf1f3bd5bf7551133309cc466d32caa0cb11860e2ffea5bee8372240b9f"
|
||||
],
|
||||
"txDetails": {
|
||||
"d864b206afccff0a37ce6a1bb697a6c6217c537760b291d832ad526a7d94b270": {
|
||||
"hex": "0200000001e37114f0c54cb6c6eac13140f38f356784082a289812540e8dc2d5fa81321bbf010000006a473044022064d48cd0549b3c64e4fe012b2a6303856ba44a711c4aa39fd991e071b1e9e46c0220485fde649603a0e1f963d106aa6a34bd2a96756397cee5475ff451385f17f1f441210244810e359356866bfd28729dcc252314f760d6b46c5b430a0f47d805fab44507ffffffff023447de31010000001976a9146e233ca966c8616981bb556999ebe48c39e742a988acb838740f040000001976a914e330f03a2bf6afc5a0e5819f28fde1671d017e8a88ac00000000",
|
||||
"txid": "d864b206afccff0a37ce6a1bb697a6c6217c537760b291d832ad526a7d94b270",
|
||||
"blocktime":1643027028,
|
||||
"time":1643027028,
|
||||
"locktime": 0,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "bf1b3281fad5c28d0e541298282a088467358ff34031c1eac6b64cc5f01471e3",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "473044022064d48cd0549b3c64e4fe012b2a6303856ba44a711c4aa39fd991e071b1e9e46c0220485fde649603a0e1f963d106aa6a34bd2a96756397cee5475ff451385f17f1f441210244810e359356866bfd28729dcc252314f760d6b46c5b430a0f47d805fab44507"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 51316181,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9146e233ca966c8616981bb556999ebe48c39e742a988ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 174391441.2,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e330f03a2bf6afc5a0e5819f28fde1671d017e8a88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"ff7cdcf1f3bd5bf7551133309cc466d32caa0cb11860e2ffea5bee8372240b9f": {
|
||||
"hex": "020000000234a3e9790ac787d2c7276a8e952f25ef76e8c048a56a8effc804363c7708e2e7000000006a4730440220305bcd24adaa24843558fbaed56db3c64d3afab6be533ce92736dcc606de7ade022067f1469cdf17395d2cc30e98b5cc9d448c803ae3d4c121eacefca5698eec5fe5412103398deb450f13c10234d6c5b74d2cdf8dc7c3ce46731815cba3d845facf44e037feffffff67260c8e7f40362980cf491831c0a1753cc263cf9bdad1f689eb2570be592106010000006a47304402203ae38828d2568f1fecd1f2b19e4220e318d0e70c48bf0282538628a4ddea8bdc02200358499ce2e077ae699ecf4fd91bf5878774d1f935eac730d55a19921847e874412103fc530a380acfed725bec8ebc2c686104f0be4e5ba0e64bc8d78bd57580ea3fa8feffffff02a8391400000000001976a914fd14b9272106691a47b8a9c0b661355ffd3f4eaa88acab2a070f000000001976a9145994e1c4b207d0503525e943702ffd820b332f5288aca40a0b00",
|
||||
"txid": "ff7cdcf1f3bd5bf7551133309cc466d32caa0cb11860e2ffea5bee8372240b9f",
|
||||
"blocktime":1643027028,
|
||||
"time":1643027028,
|
||||
"locktime": 723620,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "e7e208773c3604c8ff8e6aa548c0e876ef252f958e6a27c7d287c70a79e9a334",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220305bcd24adaa24843558fbaed56db3c64d3afab6be533ce92736dcc606de7ade022067f1469cdf17395d2cc30e98b5cc9d448c803ae3d4c121eacefca5698eec5fe5412103398deb450f13c10234d6c5b74d2cdf8dc7c3ce46731815cba3d845facf44e037"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "062159be7025eb89f6d1da9bcf63c23c75a1c0311849cf802936407f8e0c2667",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402203ae38828d2568f1fecd1f2b19e4220e318d0e70c48bf0282538628a4ddea8bdc02200358499ce2e077ae699ecf4fd91bf5878774d1f935eac730d55a19921847e874412103fc530a380acfed725bec8ebc2c686104f0be4e5ba0e64bc8d78bd57580ea3fa8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 13254.8,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914fd14b9272106691a47b8a9c0b661355ffd3f4eaa88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 2521279.15,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9145994e1c4b207d0503525e943702ffd820b332f5288ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
{
|
||||
"blockHeight": 6509294,
|
||||
"blockHash": "0x55eced8804c4358572c612e5507994590db91000db483d4f30588be2e85a31ca",
|
||||
"blockTime": 1646866921,
|
||||
"blockSize": 60725,
|
||||
"blockTxs": [
|
||||
"0x583468dcbc06bd14a523a5809872b2cd0be9481f24380e78463337e79740135f",
|
||||
"0x4ff5b60fceab52918f2e1f9d39c125c8c5856fa2349003c6d163225a145e34db",
|
||||
"0xa08ca828de3986f3d182dc13c7293068ec5d64d63221a196b5e589fec10a448a",
|
||||
"0x43dad1209906ad2866cc9bb5e0309530b6ab744b55f62c5c66406197b64583ae",
|
||||
"0x43a8f9a93060681a466f918dd90d836fe089115e8c92a4b13e37b2982ba76090",
|
||||
"0x1d1184e4d4b125e7017ad0ea8fafd59d34ea848abc88a0b0afa648b5d148ff53"
|
||||
],
|
||||
"txDetails": {
|
||||
"0x1d1184e4d4b125e7017ad0ea8fafd59d34ea848abc88a0b0afa648b5d148ff53": {
|
||||
"txid": "0x1d1184e4d4b125e7017ad0ea8fafd59d34ea848abc88a0b0afa648b5d148ff53",
|
||||
"blocktime": 1646866921,
|
||||
"time": 1646866921,
|
||||
"vin": [
|
||||
{
|
||||
"addresses": ["0x68A3E5Ec00Ec5880Fae10CB69f047fa42Cd2d32C"]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.4,
|
||||
"scriptPubKey": {
|
||||
"addresses": ["0x71F33321375494206d23Cc3950A923a9b4c615A4"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
40
tests/rpc/testdata/ethereum_testnet_ropsten.json
vendored
40
tests/rpc/testdata/ethereum_testnet_ropsten.json
vendored
@ -1,40 +0,0 @@
|
||||
{
|
||||
"blockHeight": 2870000,
|
||||
"blockHash": "0xeccd6b0031015a19cb7d4e10f28590ba65a6a54ad1baa322b50fe5ad16903895",
|
||||
"blockTime": 1521515026,
|
||||
"blockSize": 2729,
|
||||
"blockTxs": [
|
||||
"0x17ee235fc0359155b25419e0e4c65d9c500df6e71e8288d6ef020d04cc2f2cb3",
|
||||
"0xe6b168d6bb3d8ed78e03dbf828b6bfd1fb613f6e129cba624964984553724c5d",
|
||||
"0xe14e6628e866555091fda44f934dfc6bfbbcd8a81e1281bb682eaf293d248be8",
|
||||
"0xcffe6d5f4022822ba5f1e64f5b413c7f91c3a48c3739429d72065ec1a8b82e91",
|
||||
"0x1d261bf23077b7e68ad9300ce9d88e7f4f95075fe98ea76b70534acaf5cf891b",
|
||||
"0x92f73c26c99ea3b15535829cf686541a1318623baf8c49fe2bf0168bf3c3e272",
|
||||
"0x392394bb4e4463c9ed59182797b5dbf23aa41c6f6edd7f4b5025d82acf43c357",
|
||||
"0x3dd838b8d5d9b7155c960f8a138a9c499b87d84b7c9d9a513d8022b1991f959c",
|
||||
"0x4889b4d1ad3652f6c410a6b6c05a459b86e68363d795f38ec13d5dc6d595d977",
|
||||
"0xd1e1ff22a80135d904d119252c5d56a8c5b07af9d26de79fd3dda8aeffccf9ae",
|
||||
"0xd1c3b7835c6032eb9eb07fdce90944f26d470b1c027adf2951b329a783e8e628",
|
||||
"0x7f0d140329941f120b5b3fc751e30adeb87b2aebbfce5adcd0216604a34b6cc0"
|
||||
],
|
||||
"txDetails": {
|
||||
"0x7f0d140329941f120b5b3fc751e30adeb87b2aebbfce5adcd0216604a34b6cc0": {
|
||||
"txid": "0x7f0d140329941f120b5b3fc751e30adeb87b2aebbfce5adcd0216604a34b6cc0",
|
||||
"blocktime": 1521515026,
|
||||
"time": 1521515026,
|
||||
"vin": [
|
||||
{
|
||||
"addresses": ["0x81b7e08f65bdf5648606c89998a9cc8164397647"]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1,
|
||||
"scriptPubKey": {
|
||||
"addresses": ["0x1b17bc12afb65d5c4b81a9ff2a076b42a19faaa6"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
104
tests/rpc/testdata/firo.json
vendored
104
tests/rpc/testdata/firo.json
vendored
@ -1,104 +0,0 @@
|
||||
{
|
||||
"blockHeight": 126311,
|
||||
"blockHash": "4857051323dd6a10bc1c92facb00e7c8258adc9b8b680d0bcdd19034a777d72d",
|
||||
"blockTime": 1547120622,
|
||||
"blockTxs": [
|
||||
"5ee3ba91195adc9a22e61a570b168052764584305000450d04355ebcb9cc4be8",
|
||||
"2f831477d523ea717caf9a9520dd848b8fe932540207037fabf100a56d466e91",
|
||||
"347d7c8c1d77f2f835641be27d97900f88be71646bdaa14ffb11b37aaac72f79"
|
||||
],
|
||||
"txDetails": {
|
||||
"2f831477d523ea717caf9a9520dd848b8fe932540207037fabf100a56d466e91": {
|
||||
"hex": "010000000106be6afc693eb158fa010f751c347982851108ea316d0685109caaa8ec4580c2000000006a473044022048dcdd1121148ecf495df74f563384d91db0635dae3c608666511ef8f24adc19022004af5384be1bce1531d0bf8498a8bfb150f797e63e348ca3865f0322203384aa012102d79d7e7f40e091517465c50ed3f5345c7b9a4611a98103ee1ca1f8e66686ad9fffffffff02e04d6cb3160000001976a914b923050a6542d70d6eb6546ba3275a2b6ea0eda588ac06d8c849000000001976a914c353c188620cb33a72d218c0d67fb3f92ad1b6b088ac00000000",
|
||||
"txid": "2f831477d523ea717caf9a9520dd848b8fe932540207037fabf100a56d466e91",
|
||||
"blocktime": 1547120622,
|
||||
"time": 1547120622,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "c28045eca8aa9c1085066d31ea0811858279341c750f01fa58b13e69fc6abe06",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "473044022048dcdd1121148ecf495df74f563384d91db0635dae3c608666511ef8f24adc19022004af5384be1bce1531d0bf8498a8bfb150f797e63e348ca3865f0322203384aa012102d79d7e7f40e091517465c50ed3f5345c7b9a4611a98103ee1ca1f8e66686ad9f"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 974.99500000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b923050a6542d70d6eb6546ba3275a2b6ea0eda588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 12.37899270,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914c353c188620cb33a72d218c0d67fb3f92ad1b6b088ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"347d7c8c1d77f2f835641be27d97900f88be71646bdaa14ffb11b37aaac72f79": {
|
||||
"hex": "0100000004bc566f299c27644851e70f8646f2ed642985897f488090f5bd5b152d891388a9000000006b483045022100cd5ca45783f836db65a47ba568f97f890155c27ccf0769c1edf231bf6bf49f9b022021d8493fae950bced2c417ce6c4a62aaad495c4d8675e4a4a3e9d86ab44f4b29012102d91223be36388a51cef618ec34c2a1d95f85b6d85d0e07e9e963d84893b5cc4dfefffffff117437f28af1665a002c8351e903de10bd40ab73d54932bbaae28caa6f49a42640000006b483045022100962a7c4b0a96b25fa418f92a69e9f37c5517740d50e996a92724f064bfadcf75022073f1c0475215bef70de392273360655a0b0d4f1f8afd3917614a5dfd1ddd1ca1012103bbfb869bf408cfdc237c63c1dcec226faf56cc141c42ef6bb8ef4d156df669eafeffffff0dd680cce849762fa7f3f117a1b0e3e7fb6493f2600152143502aa59ad7ca4ed4d0000006b483045022100a6b7befee6468f01e2b3813f05b81241dd5a4c0b04d97a783940c75d97b85ba502206c0dd2fa5cc5c153d359c55f24407c97aec32bf42b2723fc40374188443bd4b2012103bbfb869bf408cfdc237c63c1dcec226faf56cc141c42ef6bb8ef4d156df669eafeffffffd7e86128b28dcf2046c33f098cfcc2b7f08ea781cc119c0944b2fb23e378135d150000006a47304402204116539acc084920a86bf837ade9d938b517dfa0d346beb969cc97505e6f21520220069a9a33f798a6c1912e29568be2cef12d4db0ea1db751054db5e2311b761854012103bbfb869bf408cfdc237c63c1dcec226faf56cc141c42ef6bb8ef4d156df669eafeffffff0229b90000000000001976a914da8378d88cd781e0a6f9fdfa6668dd47a718cf6188ac80a35d06000000001976a914707077511db03836716dc01ce47442596264fd8a88acccea0100",
|
||||
"txid": "347d7c8c1d77f2f835641be27d97900f88be71646bdaa14ffb11b37aaac72f79",
|
||||
"blocktime": 1547120622,
|
||||
"time": 1547120622,
|
||||
"locktime": 125644,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "a98813892d155bbdf59080487f89852964edf246860fe7514864279c296f56bc",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100cd5ca45783f836db65a47ba568f97f890155c27ccf0769c1edf231bf6bf49f9b022021d8493fae950bced2c417ce6c4a62aaad495c4d8675e4a4a3e9d86ab44f4b29012102d91223be36388a51cef618ec34c2a1d95f85b6d85d0e07e9e963d84893b5cc4d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "429af4a6ca28aeba2b93543db70ad40be13d901e35c802a06516af287f4317f1",
|
||||
"vout": 100,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100962a7c4b0a96b25fa418f92a69e9f37c5517740d50e996a92724f064bfadcf75022073f1c0475215bef70de392273360655a0b0d4f1f8afd3917614a5dfd1ddd1ca1012103bbfb869bf408cfdc237c63c1dcec226faf56cc141c42ef6bb8ef4d156df669ea"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "eda47cad59aa023514520160f29364fbe7e3b0a117f1f3a72f7649e8cc80d60d",
|
||||
"vout": 77,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100a6b7befee6468f01e2b3813f05b81241dd5a4c0b04d97a783940c75d97b85ba502206c0dd2fa5cc5c153d359c55f24407c97aec32bf42b2723fc40374188443bd4b2012103bbfb869bf408cfdc237c63c1dcec226faf56cc141c42ef6bb8ef4d156df669ea"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "5d1378e323fbb244099c11cc81a78ef0b7c2fc8c093fc34620cf8db22861e8d7",
|
||||
"vout": 21,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402204116539acc084920a86bf837ade9d938b517dfa0d346beb969cc97505e6f21520220069a9a33f798a6c1912e29568be2cef12d4db0ea1db751054db5e2311b761854012103bbfb869bf408cfdc237c63c1dcec226faf56cc141c42ef6bb8ef4d156df669ea"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00047401,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914da8378d88cd781e0a6f9fdfa6668dd47a718cf6188ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.06800000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914707077511db03836716dc01ce47442596264fd8a88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
167
tests/rpc/testdata/flo.json
vendored
167
tests/rpc/testdata/flo.json
vendored
@ -1,167 +0,0 @@
|
||||
{
|
||||
"blockHash": "9a31f7709b377b8ac7702199ac6eb42c37a7ab8cfeb828231009acdeafcc2a77",
|
||||
"blockHeight": 1503796,
|
||||
"blockTime": 1449631154,
|
||||
"blockTxs": [
|
||||
"6ef3979d414d76a4a8e1978c2187d81efb90f6ec60a0508eee600da4541a7178",
|
||||
"3d58e93de48d07bb2bb92afda309be30c9823be3294e1282cee1e2f98e88da51",
|
||||
"e25ef1ccab910239d085362e743df786979035604e7b59fe87fb0ccecd1d5a6b",
|
||||
"3c01744c79cc873a32ac246a732ad5925bc20150f6dbbc1193f135c4ea394973"
|
||||
],
|
||||
"txDetails": {
|
||||
"6ef3979d414d76a4a8e1978c2187d81efb90f6ec60a0508eee600da4541a7178": {
|
||||
"txid": "6ef3979d414d76a4a8e1978c2187d81efb90f6ec60a0508eee600da4541a7178",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "0334f216062f503253482f04b29d675608f80000021d000000392f7374726174756d506f6f6c2ffabe6d6dc59870924a3754d580bd95b253f7f83dd5a9a85b853885f2a0fb3e1ec2af211e0800000000000000",
|
||||
"sequence": 0
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 50.20010000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91411d268c5e823c9470bbce47970217c5829ae292688ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"floData": "Multipool",
|
||||
"hex": "02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff530334f216062f503253482f04b29d675608f80000021d000000392f7374726174756d506f6f6c2ffabe6d6dc59870924a3754d580bd95b253f7f83dd5a9a85b853885f2a0fb3e1ec2af211e080000000000000000000000011046372b010000001976a91411d268c5e823c9470bbce47970217c5829ae292688ac00000000094d756c7469706f6f6c",
|
||||
"time": 1449631154,
|
||||
"blocktime": 1449631154
|
||||
},
|
||||
"3d58e93de48d07bb2bb92afda309be30c9823be3294e1282cee1e2f98e88da51": {
|
||||
"txid": "3d58e93de48d07bb2bb92afda309be30c9823be3294e1282cee1e2f98e88da51",
|
||||
"version": 2,
|
||||
"time": 1449631154,
|
||||
"blocktime": 1449631154,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "32be915643b0cf6e5d021a75aebb00a443f30f6b16350342b0eafce432772c93",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "473044022021846274fb88e111ad7b5c9bb5389f62e6db6ae1093e117abcb60a500d8f8c6b02201bca5570cf4ddaabcf38dba8b0511aa41bd64ca18c57a8586bcefed73a84b057012102f1dddda69e4f55be69ad715a49772f26139585e141b722668e60cd5ccadd3de6"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "6287f22579908df61bfbd3f0d0dd6da64f90b8b52dfe4a32cac2a75e18dc02fb",
|
||||
"vout": 8,
|
||||
"scriptSig": {
|
||||
"hex": "473044022039f52ff30741ea617cfc4c1498b4c71c896bf55040805f73cd1e299e1d2c8bff022060011240a3dba2b851399f007ab61bb3cd396db81d5431f93e76723af7ff647a0121030b2389bb1bf9de8eb932460d3a87189089fdd817395f2ff5a75d71ea13f2bd25"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "d27895cb3d10b83fcc43c078dcf91a33d1b35ec23449859e763baa33e117e38f",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "4830450220662b9002756ed970604f283750cd966e662ffb0c20221cf6e1b6c02ae57edf040221008ea206462face14a2fafdb7357760dc63a921dd016e1fefde0bc420a7cf70648012102730d67586c5c707d587a775f43b816e44f86b18f3a7330beb62f3103289a9f69"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01042677,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143363c3b92a9633a9954ab97c8875a11ea16b97da88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 4970.59297716,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914041d52fd4b34aaf26419546452dd57a27d72452588ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "0200000003932c7732e4fceab0420335166b0ff343a400bbae751a025d6ecfb0435691be32000000006a473044022021846274fb88e111ad7b5c9bb5389f62e6db6ae1093e117abcb60a500d8f8c6b02201bca5570cf4ddaabcf38dba8b0511aa41bd64ca18c57a8586bcefed73a84b057012102f1dddda69e4f55be69ad715a49772f26139585e141b722668e60cd5ccadd3de6fffffffffb02dc185ea7c2ca324afe2db5b8904fa66dddd0f0d3fb1bf68d907925f28762080000006a473044022039f52ff30741ea617cfc4c1498b4c71c896bf55040805f73cd1e299e1d2c8bff022060011240a3dba2b851399f007ab61bb3cd396db81d5431f93e76723af7ff647a0121030b2389bb1bf9de8eb932460d3a87189089fdd817395f2ff5a75d71ea13f2bd25ffffffff8fe317e133aa3b769e854934c25eb3d1331af9dc78c043cc3fb8103dcb9578d2010000006b4830450220662b9002756ed970604f283750cd966e662ffb0c20221cf6e1b6c02ae57edf040221008ea206462face14a2fafdb7357760dc63a921dd016e1fefde0bc420a7cf70648012102730d67586c5c707d587a775f43b816e44f86b18f3a7330beb62f3103289a9f69ffffffff02f5e80f00000000001976a9143363c3b92a9633a9954ab97c8875a11ea16b97da88acb4f90abb730000001976a914041d52fd4b34aaf26419546452dd57a27d72452588ac0000000000"
|
||||
},
|
||||
"e25ef1ccab910239d085362e743df786979035604e7b59fe87fb0ccecd1d5a6b": {
|
||||
"txid": "e25ef1ccab910239d085362e743df786979035604e7b59fe87fb0ccecd1d5a6b",
|
||||
"version": 2,
|
||||
"time": 1449631154,
|
||||
"blocktime": 1449631154,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "cfad1393c20b540b913573c145ad25161f16e61e184094ca8afdf3de2f5e1652",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "48304502207aac132c5f1791eea174ab95873a3c1aa2143881725409907cc1d08182d08a0202210097bc45b7c21f9f6ab189d5c89f94888744eef8baf768154a0c36e00eb91fd0fd012103d55b30027e9d8d2955222371a1f897d380d241698587c493433f56d463e54801"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "71df477f41df0d3191ad4065e8e7d0bf36a4819a667797e4977bf0d2ff52ac4a",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "48304502202e87b02826d3e615ef41250d411edd6513555cd84b8321e729fe9dcd7b51a84c022100daa6c8c311d9f11cc1ccc7ec231ccd32c7e01123d4d67a8b4a034394e7733434012103e9e208254e61775d97970563ca61c5a0c0856452ffebcd8793cad28be72d971d"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "6f88792a825983c2852f19a0ec362740b9d328d400c564f13650672bd1883abe",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100ee0678f6f56f5e902da40358979e7c19594290b4f6a4770a54741b09deecc43c02203539703f2b2c73f48e36a76d326b2cf5d91805ac0b23ee7d0790c62d310acf480121038dba4933129960c5aec4b69bd38f780128b87cff8218b23257e7889f5a0173a9"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 35403.49073276,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e33354a73c175829e72c9fc20ade3d09276fd1d588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01012352,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91489646dd1440431a3ee816ab0f8e6e2d08682dbee88ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "020000000352165e2fdef3fd8aca9440181ee6161f1625ad45c17335910b540bc29313adcf000000006b48304502207aac132c5f1791eea174ab95873a3c1aa2143881725409907cc1d08182d08a0202210097bc45b7c21f9f6ab189d5c89f94888744eef8baf768154a0c36e00eb91fd0fd012103d55b30027e9d8d2955222371a1f897d380d241698587c493433f56d463e54801ffffffff4aac52ffd2f07b97e49777669a81a436bfd0e7e86540ad91310ddf417f47df71010000006b48304502202e87b02826d3e615ef41250d411edd6513555cd84b8321e729fe9dcd7b51a84c022100daa6c8c311d9f11cc1ccc7ec231ccd32c7e01123d4d67a8b4a034394e7733434012103e9e208254e61775d97970563ca61c5a0c0856452ffebcd8793cad28be72d971dffffffffbe3a88d12b675036f164c500d428d3b9402736eca0192f85c28359822a79886f000000006b483045022100ee0678f6f56f5e902da40358979e7c19594290b4f6a4770a54741b09deecc43c02203539703f2b2c73f48e36a76d326b2cf5d91805ac0b23ee7d0790c62d310acf480121038dba4933129960c5aec4b69bd38f780128b87cff8218b23257e7889f5a0173a9ffffffff027cb73f4d380300001976a914e33354a73c175829e72c9fc20ade3d09276fd1d588ac80720f00000000001976a91489646dd1440431a3ee816ab0f8e6e2d08682dbee88ac0000000000"
|
||||
},
|
||||
"3c01744c79cc873a32ac246a732ad5925bc20150f6dbbc1193f135c4ea394973": {
|
||||
"txid": "3c01744c79cc873a32ac246a732ad5925bc20150f6dbbc1193f135c4ea394973",
|
||||
"version": 2,
|
||||
"time": 1449631154,
|
||||
"blocktime": 1449631154,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "9be2ccc510cb513c072af0a1b46254d2b5c44c24ff2db2f68c7e37969bf016f1",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b3e8229d12e2d6093a4f811f5beff06b3a3cfc3d42dc07e093939aeb072c889802204c1de9f77d7dec5e5d7e1eb1ff39f344fe0ca3156d9c25fd105906d0c7fb93840121028f47c3de96f2a92a88fbd67149a19e183a6c4eaa061da8a69149295a05cc8c42"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 99.80000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e33354a73c175829e72c9fc20ade3d09276fd1d588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01750764,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91401a4dd7be92863c933277603fe207306fa2ea75c88ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "0200000001f116f09b96377e8cf6b22dff244cc4b5d25462b4a1f02a073c51cb10c5cce29b010000006b483045022100b3e8229d12e2d6093a4f811f5beff06b3a3cfc3d42dc07e093939aeb072c889802204c1de9f77d7dec5e5d7e1eb1ff39f344fe0ca3156d9c25fd105906d0c7fb93840121028f47c3de96f2a92a88fbd67149a19e183a6c4eaa061da8a69149295a05cc8c42ffffffff0200b7da52020000001976a914e33354a73c175829e72c9fc20ade3d09276fd1d588acecb61a00000000001976a91401a4dd7be92863c933277603fe207306fa2ea75c88ac0000000000"
|
||||
}
|
||||
}
|
||||
}
|
||||
46
tests/rpc/testdata/fujicoin.json
vendored
46
tests/rpc/testdata/fujicoin.json
vendored
@ -1,46 +0,0 @@
|
||||
{
|
||||
"blockHeight": 2356068,
|
||||
"blockHash": "e6fdbcc2fe720aa54eecc8a2df8e50f9f2be21927fee87375a1d38bcb537c4ce",
|
||||
"blockTime": 1546286958,
|
||||
"blockTxs": [
|
||||
"2ebd98c5debc1e403c87966e00db42590b6bedaeb6b2fd640b942ad18032ce62",
|
||||
"88e23fb129d2b7566702396a6b35696ed445d5fe8ab3a526901bf2efe107a46c",
|
||||
"7367db1a3073146f0b6060ce4a6dbb96b67b7aadcbaa450bff8d7dedda52ec13"
|
||||
],
|
||||
"txDetails": {
|
||||
"7367db1a3073146f0b6060ce4a6dbb96b67b7aadcbaa450bff8d7dedda52ec13": {
|
||||
"hex": "0100000001ec5666d4e842926c6e872fd7f12a87183b298464716dec1b03fc956777e06a70010000006a473044022062949ffe184af6bdc8d77e07c2caf1bd4e36d977bc27e24ab6d24c9e735d76b802201f42950f6fa005126f1fbd5cb9d6f0838d94adb70a05517b3eebd144a0ec2fd6012102534f95a0a13bbc3e261f966edd057a1dc9819a4e6bb21d81a633d5500d184a7bfeffffff0200e876481700000017a9146b8a69f8b43bc06b886c0668c93197be5152e8598740494d552e0000001976a914df783f980b38d7a64cee23202af95609b547fde888ac62f32300",
|
||||
"txid": "7367db1a3073146f0b6060ce4a6dbb96b67b7aadcbaa450bff8d7dedda52ec13",
|
||||
"blocktime": 1546286958,
|
||||
"time": 1546286958,
|
||||
"locktime": 2356066,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "706ae0776795fc031bec6d716484293b18872af1d72f876e6c9242e8d46656ec",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "473044022062949ffe184af6bdc8d77e07c2caf1bd4e36d977bc27e24ab6d24c9e735d76b802201f42950f6fa005126f1fbd5cb9d6f0838d94adb70a05517b3eebd144a0ec2fd6012102534f95a0a13bbc3e261f966edd057a1dc9819a4e6bb21d81a633d5500d184a7b"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1000.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9146b8a69f8b43bc06b886c0668c93197be5152e85987"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1989.99624000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914df783f980b38d7a64cee23202af95609b547fde888ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
47
tests/rpc/testdata/gamecredits.json
vendored
47
tests/rpc/testdata/gamecredits.json
vendored
@ -1,47 +0,0 @@
|
||||
{
|
||||
"blockHeight": 20000,
|
||||
"blockHash": "181a7c4b110ca609df9c7dcc76c5304a02c73fecb768ed659e8025f1f5fb3fb7",
|
||||
"blockTime": 1395288011,
|
||||
"blockTxs": [
|
||||
"2996d6e15d962839e2608315a0cfc9459f4969a0312fea483c1f0529248765ea",
|
||||
"ba9fdfdb2373d88d20d9ddaa2c9e25820f8e18d852ed5d4062d8e46b7ea1c95e",
|
||||
"eaea085406cbbee0f46002db388e35c38d526d7b82616c41523a6187c35e549f",
|
||||
"e647a5cd2e01e7d0ad52869d6b33a9be163fcbe7c3080aca2cfa3e366a71f6de"
|
||||
],
|
||||
"txDetails": {
|
||||
"eaea085406cbbee0f46002db388e35c38d526d7b82616c41523a6187c35e549f": {
|
||||
"hex": "01000000019e41d32f54bf72489df2846bc58196e29d648cb96bfc0ad89eb2847b1efa0c04000000006c493046022100d87440b92f29e0e79159e5ccc7b76efec31209b88ea1bbdfdf0ff463f250eb1f022100908e71f4f19204d4cfaa0abd6b4753a6b3870052a4721a73cd2bad85f916a9fa012103319f1de23237d05be3dbadd03ab952bbc6641f86c77d0189e5592a4298f39ab9ffffffff0275d0b65f000000001976a91428cd329a2572f3cb19204b02251cbcf485a446f788ace8174606000000001976a914b0ff75d5586d99de1b0a6783c8568ac67f80e3a788ac00000000",
|
||||
"txid": "eaea085406cbbee0f46002db388e35c38d526d7b82616c41523a6187c35e549f",
|
||||
"blocktime": 1395288011,
|
||||
"time": 1395288011,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "040cfa1e7b84b29ed80afc6bb98c649de29681c56b84f29d4872bf542fd3419e",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "493046022100d87440b92f29e0e79159e5ccc7b76efec31209b88ea1bbdfdf0ff463f250eb1f022100908e71f4f19204d4cfaa0abd6b4753a6b3870052a4721a73cd2bad85f916a9fa012103319f1de23237d05be3dbadd03ab952bbc6641f86c77d0189e5592a4298f39ab9"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 16.05816437,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91428cd329a2572f3cb19204b02251cbcf485a446f788ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.05256936,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b0ff75d5586d99de1b0a6783c8568ac67f80e3a788ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
57
tests/rpc/testdata/groestlcoin.json
vendored
57
tests/rpc/testdata/groestlcoin.json
vendored
@ -1,57 +0,0 @@
|
||||
{
|
||||
"blockHeight": 2294439,
|
||||
"blockHash": "0000000000003e6b31abe139b028a97f4fe4dea10fd52a04c404cc85b4d7f773",
|
||||
"blockTime": 1539462668,
|
||||
"blockTxs": [
|
||||
"986e0848c7e0b438ad3816875ed6dc867393897a0e893e6006efefec0197f90d",
|
||||
"dce355dd367e757ead8bbf4480d96885108d9f248d1e74e493ff4693f97cc11c",
|
||||
"4b5f5892a385f75bcd8c5584cea2765f25976b38c450e98bc6d22e342f805ae1",
|
||||
"dfa2ae8837705ee9c5b05ffc652d54dc1b5d38dd836d8b30c5b16c655db8a75b",
|
||||
"0b41b9325d3366a3bba0bf2cf76218ea23ec74aca19c0ce37dc55b5cbcaa8b84",
|
||||
"91a2a72dacf0774c7d4f37e0c9b011a3f747518c20ea6f44ee47d8d35aed4f1a",
|
||||
"f13366400b6ee643f48aa40592382dbf3085c3e31f42e0283b0efd970533c55d",
|
||||
"062f4f5eab8ef188922c197b8becf94ab292f6f1efff57173617b27380a55616"
|
||||
],
|
||||
"txDetails": {
|
||||
"4b5f5892a385f75bcd8c5584cea2765f25976b38c450e98bc6d22e342f805ae1": {
|
||||
"hex": "020000000001011cc17cf99346ff93e4741e8d249f8d108568d98044bf8bad7e757e36dd55e3dc01000000171600142e9f7a9a16b2fcb817752f1f44c7518c83886cdefeffffff02fa76e3e50200000017a914b996e79692d2212707e59235f0a00f2f951c1ba487004d4466170000001976a914fcad3abf614562d224c6cc8b0e00d2fa9016404388ac0247304402206794af78bbfc6f39fa86788bdaff9959af9b519af133e696e2b1226a3df2c0830220254855ae4270af92a6add130efe41222cf150033f5a55225308cd0a39b7b73ee01210352b1a67fef7a34042ff4ed75cd375f22d2f5ea24353d3e6be363f967d9deb612a6022300",
|
||||
"txid": "4b5f5892a385f75bcd8c5584cea2765f25976b38c450e98bc6d22e342f805ae1",
|
||||
"blocktime": 1539462668,
|
||||
"time": 1539462668,
|
||||
"locktime": 2294438,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "dce355dd367e757ead8bbf4480d96885108d9f248d1e74e493ff4693f97cc11c",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "1600142e9f7a9a16b2fcb817752f1f44c7518c83886cde"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 124.46824186,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914b996e79692d2212707e59235f0a00f2f951c1ba487",
|
||||
"addresses": [
|
||||
"3JcKi541GubsiCdpdZqvsSy3rfA6R11tg7"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1005.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914fcad3abf614562d224c6cc8b0e00d2fa9016404388ac",
|
||||
"addresses": [
|
||||
"FtCkFSrwrgiJzjQzGRZvjHzrmHp4HJeGYm"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
135
tests/rpc/testdata/koto.json
vendored
135
tests/rpc/testdata/koto.json
vendored
@ -1,135 +0,0 @@
|
||||
{
|
||||
"blockHeight": 400001,
|
||||
"blockHash": "e39de41681e45614dae6d24c7c2a3b91f183170255377eef9b3efc4056a6d51d",
|
||||
"blockTime": 1537241753,
|
||||
"blockTxs": [
|
||||
"4b8a6f4222f8c5989650b2325f52b0bd95a949bdfad21364297ffeb745ec18bc",
|
||||
"30b10190dc78c8bf6a5fbdf051da76f9d1f52b3e9728f59520156cabb53fff03",
|
||||
"9f3e4d5dd1c9ff29f5fc33cd4eae4361286d613a135cdf7502be836f7d15f2bb",
|
||||
"a0e61612250c0d398227d4ef40882517a5430b4a61035927a30466187c35d584",
|
||||
"263c93a64ddb4b7d28c5325e9bb99240bc39cd06feed3b5ec683700de93b62eb",
|
||||
"0e4c3dfba2c1da4cd915486ad146f22b78c889dee1cc54ff455e4bb368b70e2b"
|
||||
],
|
||||
"txDetails": {
|
||||
"9f3e4d5dd1c9ff29f5fc33cd4eae4361286d613a135cdf7502be836f7d15f2bb": {
|
||||
"hex": "0300008070d9e702028dac3dd18afc4a7b987e41e75fe8d3cee2c33c9acea0f079b19e517c0206b5bb070000006b483045022100b5f1dab66eec7ea3fee1344f353a9a3860a472137828e66d629fef093ed40ec102204249772ef83d48d54e79db42c9c3f96968fb287e78e610935d8f5e84bd5df5de012103eb81a02cf6b514286a29c9b13f95bc65e135940c7aa4bf0e5535573f64e3d2f2feffffff38d3fe7d919cc206eb8ea8bba7f46c1efe2fd08573ff5f2fb7f0efb52fdcd8c4020000006a47304402205fb4e11d1b522566bf2a428030aa989128f2cbd9aeb608402922093a5f01cc3a02207e98acb3930f8970a225a657bb500fae3945d216f5e8775804c931fa3bbcd30c0121034d68df7ac2da467d6480aeddfe076315ba3fdafc4e568c6714fb301f4ee5a033feffffff096d658549000000001976a914cfee27bf568398a2d09ae04251079539f639d7f388ac2437e43f000000001976a91428571e957ed3656db8253daabf670215cebfdf4788aca332873c000000001976a9143ba65fa42bac98797efa0f6c93152c23b7cb08af88ac216adc48000000001976a9144f3bef9a5208ea46030beb6fa9b90e4e939b8eaa88ac50bcf83c000000001976a914a2544801b722f4b8cceb7ca2b98865a13cb3207b88acce783f45000000001976a9149aa1f7f2a3f00fe48212e9e5bce46b4b0717778f88ac43a23c41000000001976a9143c9afdf3ac0992a34ebf75070462a3e437badc1688ace5c96d3e000000001976a914b732115e4c34cc3fae2ab1f11ee44b818a088b9388aca472235a000000001976a9142f899651606c3e6d2911e75590d4779cbe6c1d1c88ac6c1a0600941a060000",
|
||||
"txid": "9f3e4d5dd1c9ff29f5fc33cd4eae4361286d613a135cdf7502be836f7d15f2bb",
|
||||
"blocktime":1537241753,
|
||||
"time": 1537241753,
|
||||
"locktime": 399980,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "bbb506027c519eb179f0a0ce9a3cc3e2ced3e85fe7417e987b4afc8ad13dac8d",
|
||||
"vout": 7,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b5f1dab66eec7ea3fee1344f353a9a3860a472137828e66d629fef093ed40ec102204249772ef83d48d54e79db42c9c3f96968fb287e78e610935d8f5e84bd5df5de012103eb81a02cf6b514286a29c9b13f95bc65e135940c7aa4bf0e5535573f64e3d2f2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "c4d8dc2fb5eff0b72f5fff7385d02ffe1e6cf4a7bba88eeb06c29c917dfed338",
|
||||
"vout": 2,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402205fb4e11d1b522566bf2a428030aa989128f2cbd9aeb608402922093a5f01cc3a02207e98acb3930f8970a225a657bb500fae3945d216f5e8775804c931fa3bbcd30c0121034d68df7ac2da467d6480aeddfe076315ba3fdafc4e568c6714fb301f4ee5a033"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 12.33479021,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914cfee27bf568398a2d09ae04251079539f639d7f388ac",
|
||||
"addresses": ["k1Gnxv3zSegUj9TVxBqu1EpcuiBNFjgvhA2"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 10.71920932,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91428571e957ed3656db8253daabf670215cebfdf4788ac",
|
||||
"addresses": ["k11Wq8sAUk2R3KTYVFDAGjkj6un5YPsyTVX"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 10.15493283,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143ba65fa42bac98797efa0f6c93152c23b7cb08af88ac",
|
||||
"addresses": ["k13GvvBdBCDGRHRY7rwRM5JPNGap27gAHaC"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 12.22404641,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9144f3bef9a5208ea46030beb6fa9b90e4e939b8eaa88ac",
|
||||
"addresses": ["k154Uvbvk4ajTHY1U7oL2TQMRupqxNWPsd3"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 10.22934096,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a2544801b722f4b8cceb7ca2b98865a13cb3207b88ac",
|
||||
"addresses": ["k1CdrB4tpn2vF6ER8oC3J1MYqX7VVpNHDdE"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 11.61787598,
|
||||
"n": 5,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9149aa1f7f2a3f00fe48212e9e5bce46b4b0717778f88ac",
|
||||
"addresses": ["k1Bw9qLeAXciUojpj9eHQz3ed2kJ3aJjSGP"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 10.94492739,
|
||||
"n": 6,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143c9afdf3ac0992a34ebf75070462a3e437badc1688ac",
|
||||
"addresses": ["k13MyxZvS3xGNEAmJeJCD1dCmu4dLcHfYYC"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 10.47382501,
|
||||
"n": 7,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b732115e4c34cc3fae2ab1f11ee44b818a088b9388ac",
|
||||
"addresses": ["k1EYBNuURXhmC5D7z8L8YDgfKUj3xVhamGZ"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 15.12272548,
|
||||
"n": 8,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9142f899651606c3e6d2911e75590d4779cbe6c1d1c88ac",
|
||||
"addresses": ["k12AtKmQqJmV7Y3N3XoJCoTtqNbb334pH3o"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"0e4c3dfba2c1da4cd915486ad146f22b78c889dee1cc54ff455e4bb368b70e2b": {
|
||||
"hex": "0300008070d9e7020001053e6c78040000001976a914536259bf0057233c3ff7116be0246b6f87a000cc88ac00000000901a060001000000000000000015656c780400000011add50011767d2d388e7a4f4faa8400991a71b3374d857209a1a5e2c2f0b96ba6884acfa94c570f8b475e0ecb03e79ee281516a19953a46039fd933c5842d57895b8f668d94b71597649874dba3453c0c86f0984d2216cca501c7b7a2c68ad0d5e4d2c70c422f55496641221f00d7f6806e8ba46040ac0c3bd3f950049ba65d893c57ca27ad7d54663cda4e5d1f1333e6915841e0c1310ed8247bd9481c770dc9956926e11e88a5327fb0f4ae5d6e2040ce8ced0b8cb055e548f12ffb3ec50138d688819652413d3cbb5f2750937955b5fe6f572fd3f7bc7aaeec5fd682838e4c48dec6645dccd6c875f732184adefa74d4c869d1f325c304113f92ee4e0cc6a68e06b43cc9bef9afb7c7eb309f61ae4d9a7ab039c824af0d1cb382a8faf3ab0204dce8376bc7ccb247b9c024d4e0fc4252729198b13f9d340de6b03bcbfdc9e7031e5d0330c4cb32c2ae4380ed05d7b5c38a1c51a2a249348584bf7f2f43c7dace0b06fffbcca780f218ecd02bf799232ce60bb67694d8d7507bc7aa57f872eb1f24da5932df7ccb5bb355c596ff7302063a1918d698c5690469a32938bc2c7b975b021e2f5498f928683be563cb5b1ee53f33d0e8a4ff4566614fe305379ad2a90451022f32a7353c12db86c286b839b07e521fdba78479d4ff4b2992e3f5aeb9f07aaa020e601f93d69fa2af6b72165505b4f620d5e53dc64f600cc61f9fd7f78d106747032aab2fddef12a3a223f51cab9b5c145b4655f99af6674b9cf8ad1c61cbc4662002197e847a1d045fd0d309a7852d64b24776bbbf3d0f28f12e9a22a38c10970c92f120d3dd75e872410e95ccfd3f689248cc0311884df7882f0baac72c45111b0905827f5f4d8b156a04bdd725c54b5f742602b8eac4c6beb2c59fcefcf70cb2167c6ec4069a7d98910dec0ccba55e2c40705dfb8ef0131b601581108c808b20fed4feec165756d5485d72e67b13fb53b07559a855ab8a4b0fb053c530a4cdd9e04ca0cdc974f8a15ac46234663a8dac80cc582522f3421b5c04a8c74f696cb67493352daa7f314fc157e1165066ba0a0a68180b8174641a896e8a389af813ceab7a74653457b145c40c5de457ce065032f58763e65dfbb8806908001ba29a35c4eac8002f93761744fd59d85f0fd8d0f5dd0bde61e385f012a9572217fdfe34572f35b297c149927a79db9270978356f02d26ab0bab17677c458b42379ac1b74efa24d378414b710a1b3e5022d5ff19009c3a7aef6fa5f5dbd1a51da71618b63c5d5d96505ddd03f9f62d645a1ea612eea50dc37bffb1dd6355bc3596001f670efb8182018e36e8d166e2e637343516bb6820ab801c2578de51355f8c9da6bade2511349cbadb4aea27d75eaaed02d0aa2e54ee621aa2e93a1142167061e85e1c4627fbb25b6856aac81093e106143f6dee08b3d621a39ad49e581a7efd6c366c618f891c3e291f26e0151b73fec16c67526578c6b9f5a294cfc8dac6b5cd7b98e5a73f16ef84e3a31967f5281586816bc44a2a2f67c5fa62b4dba15ceea205aeb9e40dc613f39ca4221ed6d5530f3fce0d1b1122f7ec9bf86e97b3e8b92e6198fee7e68844acc003e183c68dff96619214976a61138b8fc8ec16882c1f8b187d96ee7c75758836fe4de4a1b1a383238ba271f75374c924707647844c4c287a5246ba62e149ef56ff93f6fed021a101678e265b7ac4c542aff8159703b3d94b00f647a0492edfd431532541f2f8e4f618f1c34977903b60ff9bbfc1b27dd09090eac211620256899ca8d5b94bf6ad3844f7a86d2cff2116fb1eb6cc59b12f447eeb9be0f370602b20824d16ae4f9d4fc3d92bdc6a0dcab8764a4896bc7fc9edf7a793606ff66e756f1f5bf63c97324eb09a07903a0545cdec3709e93e0438e0af1b80842a23e314e98aad7015ac835d458878d6844b9e2fc532db99f8d2640107959f3d994a35be311c6a9ca3dc6838d6b93372b6de8b34663318b00261264c0c8bd5ea949a1923505adc2203e062fd0922c3b6232678ec6a4bc5b623021658ca516f071157165ba0946bbc9e3e3507633d9ec72f8132c3c1cd9d78894b781a4a97764497fd7d535951d9681548a6a9aabcd768944f42d7b4891a25ac6cafde6366f3c37fa88f3fb2e4d6dd6c1a3dbe474261af076bef57d51c5e5159a72cb7ae1c308e5c0405a6a102b152b97da70413b04dd6adbed9c28b5acad1455484203452aba354f99cec57e8aefb432ee631a3c90719c31b17f88039193cc983ea37289f66977f975df0370ca8df54ead80562476592152c40494538974dc354b13a298872c5dc61910660321b4e0b08fd214abb051a8df8594cec54a2e247a631932240ea1e42ed7969a85bd0a171f0276c677a58d3a849fa8bd687334e90af7b37c5cded83daf8fa48b13f7fb718d31859a40aa1e60e22f4794879c0e806c47a41ed943b0bc70f451b1c256938e5f3e8e36b0262f93331d813b7c41b31b75b592efc6d7923c536a75ffd8ac5c7f9f3ce2d1f77932fd9e6941acd1a37eb89556dfb75bfa5abd5dfc4483fd42e552d87afa0b961e87bef3aa42310588b72942fb1b12a52e37bf2af438dfd15621df742b0031f5d530220c690bc66cf6019168737b5fefed474662b8a44414d6c80cd18d527d1ad0a",
|
||||
"txid": "0e4c3dfba2c1da4cd915486ad146f22b78c889dee1cc54ff455e4bb368b70e2b",
|
||||
"blocktime": 1537241753,
|
||||
"time": 1537241753,
|
||||
"locktime": 0,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 192.00228869,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914536259bf0057233c3ff7116be0246b6f87a000cc88ac",
|
||||
"addresses": ["k15SReTvjGj9cxnyw5VzjqfXMJX11myKS9G"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
68
tests/rpc/testdata/koto_testnet.json
vendored
68
tests/rpc/testdata/koto_testnet.json
vendored
@ -1,68 +0,0 @@
|
||||
{
|
||||
"blockHeight": 250000,
|
||||
"blockHash": "6d840a09897d54a485d090e6fea84ff88190686e45093d4d6b5557d7818565fb",
|
||||
"blockTime": 1539169834,
|
||||
"blockTxs": [
|
||||
"ade35f9c49194562bf0c54041b38f2a2f45dddb5e477a98e3c129d35dc9639a7",
|
||||
"258812b11654737989d6566b026b566288f9b822a6d665505e15128879c880c1",
|
||||
"a91db9da8eb226b5ae24a41f95c3aba2a7e17eaab9510055b0237c59e266b7cc"
|
||||
],
|
||||
"txDetails": {
|
||||
"258812b11654737989d6566b026b566288f9b822a6d665505e15128879c880c1": {
|
||||
"hex": "0300008070d9e702032fe75a1cd3d0cac71114353e24fd4d270702c2311b9e9d8f8f1f4dbdf5ddc8fc000000006a473044022040828b07862d7d0a2ca014ddea7f3cf42a313d1cde828e390566c7b05bb0f8c702203e999f511720280eb5bd0baf0786efd8457127f9abda902d05b0105e137806f3012102961bff6a22ca78ec09f05f9ad90f35b93dab8bf7d6afb0e51ff2706d55c222a2ffffffff73f04bf9ccc77cbfccc1c2afd5a14cecf0e369f98529242f75355e7e7a839d3d000000006b483045022100ed03a956400199c327d24ea4d283bf7503af4360376244ef1a923e2fcafbdcb902200107b8e0a853146cbf3a733af17b2eb231e9f8a4ddf582dbccb49a341356bf70012102961bff6a22ca78ec09f05f9ad90f35b93dab8bf7d6afb0e51ff2706d55c222a2ffffffff91b4b4ec8b60b80ce35c2f5f00b479765d6a3bd97b46467cc3283ae50ac3a080000000006a47304402202943f9fe143887754c6ab61026b72d36be80d776ea68f2b4915483cd8ec396c302203f8396cd9fc574e1227a1a753a8aafef5f8a9a805782fb0cf49d940383bdcfca012102961bff6a22ca78ec09f05f9ad90f35b93dab8bf7d6afb0e51ff2706d55c222a2ffffffff0000000000a4d003000118bf7ec6060000000000000000000000c244cc64acda1a46d9ca98c8b8ce0334e20c0b19e97ab93992c1f08fda48d4533899e9e343d58ce6f7147b84d6932332a9a6db1a352160efde82b54a4d9cbbea5cb07115cf89f140eb0cc85b6753e5e64f3f937916719127cb68e697634f1a264cdc7b19bdd051f8516e562a9ebe5e09e5dbc20aab36d4a42c8aab5950be7fa3a5c908a802350a12b0102d15199118227c1802ccd13526c21b8f96a4ee948794b78c372a62cb81edc5ce72fb02419740611e33c8c51e8b8f95bc1ae5260c733ba1020265be16eae4ab452c1b0fbdb7d11215afc561741f8b2be445dcc49aad33e9e2eb80da860637fecd7aa7171208cae6d2af846e555bbbc84b859686e2489d7c043655667fb7616045233a1f2b9fc2c16866d33e7a19dc6f4771beb2bec1d1022fad4d44b83b1543f9668b5298cce2c8097bc930ae08d69e9c5f9f37e9fc66210222bb675dc00b16fa0c5a53248b4af161fa11c9329335e16ea75b1a704c7abd1a0b00531037d418f03c72c52f2d8ea84390e2e0c592f857aee18aa08e220a9b15ed6a930ec3193708e63bb546d28dd5daa050a34ecf7d99186c34b03f4263d3a001032ae9d83a241704963f0691b544a7726ce9cf6587c3a06e27964e129e51d242d30211770998b9ba6543986c9f1b5a7552969939e295a37964aff64a16fd493d07d9032d42c640e293e0cc7a732a67e33b8d13e722b9660366aee760547ff2897efd8e021dcefcedb7ca9394901a55325e4b2a314fb83132918a8ac1941cf3499361935f0223cbe53a427b89f94faafad6762fead8f57e5310ec18311eab048f3eae28253553f136d5b498e28ea72bbe164d24d24ed1e1d9661d02c63055be7f9108d9cc2a926bc74cc9381ec7c0a8e004f783b462d157d74dfb473d7b055325adbecbd99654f8ab5f7bf490d635dbc4766fe99e0b6b2736dfff81b58a150cf0544a929c441c0669d3337a00f1fc95146ee907f789d3ca89df3910e16fc3526ee6358066ec531e983907b6e1cebe0e8603cbdfcefd3e952726836ef56eed76276493dbc7c3562671e7067dfba96371109445e07b90a56aebb1756ca2e3680ec4e241566881c798b931a4f533e6e56065467239be6723800208bfc90d7e0ad0b353e5c30b883f2bce989accd3bec8dcf0504c9e458de767b5f31660fc631f0b9782faa62893b540517785cf79b59b343795d0352d6168f6593f56a5a7913a938bc11b60babc4269ede64a1fc28882e327a7105edb99e4555ccd267e29217ccaa44078544be83679f569aab6936fba7b9ae935c470a3d58f4b47e34c891baaca48564ffbc466ea39f2d44bcf0103a50a01271477240774fe65821a02e10a139eb7bb1554d23b2c3aac95d1f0a418ab728a764cc118408819a09645650cfbbe7486a05de4310ed0b8bac3e0c0f747c47a28205093d9026a2913abc69a60f6b35d0199023ae4c2bc03afd8a4052781c101322e0d55953289d6a8a5e3dcc797d697c2bb4c076672f751ddb4c9f073c488e683a35ee1b6cad1a60ef2f74a123a28d2f4abc0ae335941d886b9be368454e4bf68eaeecd4e9b051868d7ff8e8fe18f956de6b1fc7da224e870f77439a58379e2c1a7ba23936d77e59083c4e06c96268e9ab6c94d08bbd87482fe09624f79050fa52cbbff62f68fa5a17793d98e845994dc7265fe0a00751f77ff9661091fe3978c9d3f67758da843246c43429ead67b3feca2e6dda5496db54890ac42f66e2ab18f0cef8621e32a322f5a888d5fe913ed21cc63fdeb1ebb4cdcbb0acb92fc3a48bed2f0664799f04cc641556aa2c53bc8c2df70b7a9605206c4d8e83ff5da9aeec0efb294a6cb65656c611874161afc634128d9faf84e828f1388154a114fc6bca5e3f0832a302efeec36856e5dafe6d85d8605878d25c77135f0f43706d70ad853e2fac1cb7a3a2365d8f729aa437dce6b7306cf05056fe2e99c2a7614adc8a58b22b3d6af982601047e423f475e1e8a2544f738c513a9cca1cf43109e882782d3d57eb6cee1fa32dd9532292ac0607c6f3dee0934035fdfcda9b3dd33ad09b55755f6375e18f65bbbe7fc5811b0eb0a8c9809e978104fa7cf6fa73647747709a467df3f7c9b802c8eed451fd39f39b5fb2f087bea982184ec3560306f24c14e3f256a0ed42508e23a3700315d08286fabc52fe6dc92cb4711f0af002320bd925f19ae3fa9051c8fabe37f203094edc7b70bb53455582f8c5241ec4ac151d098c82d6b6975c673cde52261cf6b66e25544901e50ff6d0ddd41f098ed48cece7943f318b7ec227b31f3e018c9a48dc6bfa46e6ad38e6ddb4f8a8cfa0fb9d6131de56e7dd0458793f450e59d50d9f38c44bb59d7cebab6ab2b8c337f09ac42e33b2b63b242dbd5dbadd2db6acc79c951aa20c125144f280a6414d63f8fb28353147432e24367e7008db9772462e743e2743b00f441c8cfc1448abf1097f8839eaf9d8e557735f68ef0f8b2bef2e746a41202144290fbb93832871ff7055774aebbcd098f0421bcfdcf1bd113b243699f06e91b2ae280b62365ba55f92b99b9a69955dcd3f5c3dfda99f9518aea432725cae0315e855f8dda17e5c99b3fb7c46652cc917de8407347e265ff50be3f1a470219160cdfb17116a19dc0fe677756dd8d8403a574a15df07",
|
||||
"txid": "258812b11654737989d6566b026b566288f9b822a6d665505e15128879c880c1",
|
||||
"blocktime": 1539169834,
|
||||
"time": 1539169834,
|
||||
"locktime": 0,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "fcc8ddf5bd4d1f8f8f9d9e1b31c20207274dfd243e351411c7cad0d31c5ae72f",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "473044022040828b07862d7d0a2ca014ddea7f3cf42a313d1cde828e390566c7b05bb0f8c702203e999f511720280eb5bd0baf0786efd8457127f9abda902d05b0105e137806f3012102961bff6a22ca78ec09f05f9ad90f35b93dab8bf7d6afb0e51ff2706d55c222a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "3d9d837a7e5e35752f242985f969e3f0ec4ca1d5afc2c1ccbf7cc7ccf94bf073",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100ed03a956400199c327d24ea4d283bf7503af4360376244ef1a923e2fcafbdcb902200107b8e0a853146cbf3a733af17b2eb231e9f8a4ddf582dbccb49a341356bf70012102961bff6a22ca78ec09f05f9ad90f35b93dab8bf7d6afb0e51ff2706d55c222a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "80a0c30ae53a28c37c46467bd93b6a5d7679b4005f2f5ce30cb8608becb4b491",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202943f9fe143887754c6ab61026b72d36be80d776ea68f2b4915483cd8ec396c302203f8396cd9fc574e1227a1a753a8aafef5f8a9a805782fb0cf49d940383bdcfca012102961bff6a22ca78ec09f05f9ad90f35b93dab8bf7d6afb0e51ff2706d55c222a2"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
]
|
||||
},
|
||||
"a91db9da8eb226b5ae24a41f95c3aba2a7e17eaab9510055b0237c59e266b7cc": {
|
||||
"hex": "0300008070d9e702000188b91db3010000001976a914d394f4a1396ea65bfd51575928af611b8dce67d988ac00000000a3d0030001000000000000000098e01db301000000c244cc64acda1a46d9ca98c8b8ce0334e20c0b19e97ab93992c1f08fda48d4532ad2d47594fc399ed535e91f545665e63ed114da3218163bc58353db891d76c675e02504403cb21b2fa7da7b2d3c2e2032b67627b094027d43b87024f38a21736ee91ac00360f1ba9cd4050b9e874e8ecfe312c129936ab39242230d4c654dc729d886cbe0a13f6b0e0988c665137649507d7b9fd8017533f7a083619530706a068eb381a5dbd36d1fe44e4ea53d85127b1a7c9128c1fde0521f25ca06774a6a696d0a9c974a3ff4dd63765bd889b1492764702503047f52bb352f4201d1cdaffb299b5002aa4ed4c7db0058de1e683e3847ffcbbb20dcf1ef07c1c5e4a7f251601659ccffd9c5a90a9123d0a5845593b0fd07aef0726079a6018cb0787a9cda020a054c9d3d78cbb722f0f9bf5db5bb7f8ee7a9b8b687f285672fd3bb8bcfd3f7022a5738d1142cb1c2917ec64a42d3003408494eb724013fa1d532a68b3cf846630a09077ab9362a00bb2f578663c404b36ff69f972ece41ff00d89833944e530991214c1d68a6a416992c78353a47062c19f6d35df481a6dacae3b14a83d8bf09e1031019a025578b2db7d9c28e68e2b841d5863bfab1f083a8fe840c3c6a26528fe1032f9cdac9a0d828d0ff03f2467871a0088f5a0a5d5679f059ef341b5b06dfe66d020eb57efa8300e7e579b679f5f2fa4b48cd18ee60369566b393fa911ada9c813303256b4ad4e9ceeecd79e1e29a122051c75ef6a2667414c7ca6f25e001dd190d6203256ee6d796aea38d2b3f6fef9477774d8757cd00d70f0b6b1e87601e57df44027ec75cfd5f45ef602a7d38595885f5bdb4737097dcfdadb18014ae60cb045bc8ffd1bdb8da11d99272ef41d946cf74c3171e3d8dfa1bf93c018da115aba94880511767dfa0dd80d98ca339138c46dd266e02f60bb6c9cd58a95f181bcd8642bcf8b66af7877f7537391cd2b17a04966f1bb0184c81876188b0ca5f404dc57628dd113055becede077f2447a3d1992c6188b19c70fc54139d4cafccd2dd1a17eb08da1b79fcfc5385b449fd655c82f0fab03a6738f28c5245bc18adc9cb8890c690846a952b86cd15345724b4598db731139d03377cf48227a4da584abaabc8976c51a8a090c3018b5595c98e2c25b8d603c07b3127dc886a5a6ee7c3d222664f7ab45b3def34e120da3ced88bb6e5e25546a0b315472bb83475f6acfd39cc9d8bc65d92e3741ba44182df71b8812e64209de28f0a5dd518e16fd8c19f16dfaf211200b5a095c65703dc8209bea66c2c7740a01f6ce65d17fe9f2ae7ee6a009c026fd2397efc865cce6459c10e0acc5f8e143d9a44a7f699f7ba1f4f566f9f1dc1a04a027935466a10364dba97581d6be53c7241490fa87fd22c68549f0b572dc8d697a59a521f8f8be122c1e99b806dce21b04dd13c3089afdd61989304fe6b20c344f59e464dbf9c422b101ff338bcb6fe01c960664adb54f594f4223f129e3f5ea78dc66e351528918aa6c8a27b35f28deea3111d68342a5b29f79aa892ab47458681b24106156e5ed791f7d63d0fac47c28733274d2279416724f38212f3df7eee3902211550030c60e23da64b5cc8257ce3ae98a20aa24f5803979f1b437bdfcc047190295d61bd6fddd39829f7e5faaba94a694c2c29971fdbfae9cb7f1e4362daae9ac8c1a9e3b97c4f29f9d7fb922cd478e6dd3381fc6642809357c66c6718c9ea674db965ac7e84b508af57c70b543ce78baed196a4b916d28833c3e80947dbf0cc0d0efc1c2e896fd84026444819184ffb9e9374171ddf074d0c7b5ff6426f67dae85f960ecd0c53eac28fcb6530e92db95c431ad0efeeb586eafa9fa347e0d0c7084b94be363dd7bf61a6af63692f24118217518bcbcae1e74cbe9375cb6d17691ef9058887e0cb0ea93ce2c390968c0a42292f337ff7fe3b2a03bb25988a56cfc6b4606dc12ce5b602cbf7c7da743b58cfd81d77c0a5bf1548cca9e4b34a5671f611dc9ec41fadec51bdbc06e5a4e8a7bdca6417915b6979236d8ae87786bcb1bd1d25af54aaca0e584de408a39cc2aa4e73f2760496f313b708735cb8c6a1affe23f31a558dab0708dbfcdaec1e2ff557624c53bf1a8dcdea35c8d160c4a593262284c19bd780598ebdbf5498c50a3adb823d6379a0b36b530f6bf6911d8983872e3052a4f1d467457e60d51c20dac0049981ce4774e47fe215d9c96feb2f046cc8a250dce56295b23d16568770872c911e4ea0f8ab3c5b0fe5eb3d8323dfdcf0fcc1fcc7f783f6d1080617ad1a43eca80f45b3e208980e036808c936956e571c327934c6ad37323fe289b8fdd674f0b43bd905d23b0bc57c12c9667093ea2b9401d57342e18f7a3e129383262c6cee5041f54f66edb519d5ace6b6666b68fc6290954daf8e5b89751a14ac48b1ff9a55f94d6ab9b913d68c9fff1d15401904b3d85e90d03cbe5521df7108a958481477ad730162898585e2164094de164cb3a5efa46ca4d1765f26dbb58c28cf43c45cfa1da069124e44846019fcdaca4f45c6b46c8aeb3f70ad0e5b9ea6753fbd36793d8bd9484da17df7d0813c4d3fefd4f149847d40841cfc7113d1b0faca7afe2ae30fa0bd22b85c70ac06217a92294472749022dbe0ffaf35685b903",
|
||||
"txid": "a91db9da8eb226b5ae24a41f95c3aba2a7e17eaab9510055b0237c59e266b7cc",
|
||||
"blocktime": 1539169834,
|
||||
"time": 1539169834,
|
||||
"locktime": 0,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 73.00037000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914d394f4a1396ea65bfd51575928af611b8dce67d988ac",
|
||||
"addresses": ["kmYJd54YsiwaVnPc5mvzCf5QuWB1qSyG8zh"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
50
tests/rpc/testdata/litecoin.json
vendored
50
tests/rpc/testdata/litecoin.json
vendored
@ -1,50 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1377592,
|
||||
"blockHash": "bddb1cfbd474e9516399b373e411bd33c1a71cb01aa8469a27d397ef0a891c7d",
|
||||
"blockTime": 1519947864,
|
||||
"blockTxs": [
|
||||
"84e9147bf6e171adbda3b3961e467652286d9d9c2933d19326bf84766d047922",
|
||||
"8d6e628b891dd17bfe3bb5a24a6c7f02ebc2cf499a85515d0325033aa74ab53a",
|
||||
"5b77ca9735f65d110b086be410658d0239e1fcee13231942a262b35a5b8d6a91",
|
||||
"19ad3daa2447be4e000d822f79ce252f274b016dacf1418b433d36c0aaf24f18",
|
||||
"5bffbf0c8ff66d298d94dc323c3644e21932dfc733603d6637ff46cb8d34466c",
|
||||
"90d587e35b23905f0125111f41d69bb6c7eed44f0944caad2903aae1f174ac49"
|
||||
],
|
||||
"txDetails": {
|
||||
"19ad3daa2447be4e000d822f79ce252f274b016dacf1418b433d36c0aaf24f18": {
|
||||
"hex": "010000000001011f9216c16c78386540d7ae7d32657c388ef5f204596f84ea0851dcb78c479a87010000001716001432d094c8e2efd308d2c69affd6712ebbf7a5a286ffffffff0289544a110000000017a91457ca840d6c811dd6808722babe3f88d2fdb2ca14875bb1c9180000000017a91482696a9b4188eda8f93b120315cad4260cbb90db8702483045022100aa256153317133fa719180935017671e33ca77df6f5426554f5b0855f07a392b02202684e8c30623e1c4e753ea23a95bd571e1fda7d15dc0b1e2d54ff5bc50329256012103399a1d98f0733ef400ff8d4f43fe4543065f7f387c863361c77a8826321ca6fb00000000",
|
||||
"txid": "19ad3daa2447be4e000d822f79ce252f274b016dacf1418b433d36c0aaf24f18",
|
||||
"blocktime": 1519947864,
|
||||
"time": 1519947864,
|
||||
"locktime": 0,
|
||||
"vsize": 166,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "879a478cb7dc5108ea846f5904f2f58e387c65327daed7406538786cc116921f",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "16001432d094c8e2efd308d2c69affd6712ebbf7a5a286"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 2.90083977,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a91457ca840d6c811dd6808722babe3f88d2fdb2ca1487"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 4.15871323,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a91482696a9b4188eda8f93b120315cad4260cbb90db87"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
55
tests/rpc/testdata/monacoin.json
vendored
55
tests/rpc/testdata/monacoin.json
vendored
@ -1,55 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1205643,
|
||||
"blockHash": "60c80ce4f0a90f7b217bef8fab32ce2e499a4dc2067f4a6062048e3b940d76c6",
|
||||
"blockTime": 1514835214,
|
||||
"blockTxs": [
|
||||
"38b4a919ab0f8b4570e1f26717740846b7994ba22f94c51d96eb32bc45c5886e",
|
||||
"7f793aff2f74ca9cec6df08a7c0fcaa1ea301468459b46edbed693a871832298",
|
||||
"c2bdcc759c1d4e6bb3eee859cc7400bc376479e30bc8328f31864aad92d52ade",
|
||||
"8a26deeda15f1ddc3234acafb0da9829bf334ea108e359f11d8f281ae42512f8"
|
||||
],
|
||||
"txDetails": {
|
||||
"7f793aff2f74ca9cec6df08a7c0fcaa1ea301468459b46edbed693a871832298": {
|
||||
"hex": "0200000002d9d3592e550618b41347bd992d33b9eaebe7e26eb21df49bda5372ce1711f8e5010000006b483045022100b4fb223759753d82fd5ce833e84f62904c086b51fd2be11d7e3e9f183e2442850220079f8b3d6555610ff98da3216fa117bcb49f98e610a38471d69566ce7bc5770801210362c5e60c40f0b588216310dbb2f4a46e86038ba597f33d023ad64e66ff2e972bfeffffff4f4e9b373e6cd134d2f5f45bf3645a00c2689472ad66aa37ae022eef3dd6b16a010000006a47304402203dd8510301d68bc21169f953d2996d602f8411a309c494392b6f2bf85e5d58f102206fa2db245d15021f3b556d10747cfd8eba100fd19dfa1a0a9c5cebc58d7c22f6012103c65394a4c6705e3a13f6305e7997fb68feb192acce312a8ba144994b9a33507bfeffffff02bbe52c00000000001976a914eb0f5829a547f30b3d488ab38b425c1d93afb4b888ac00f90295000000001976a914883f0723e1c93db538d02c7a8d318322e655b59888ac89651200",
|
||||
"txid": "7f793aff2f74ca9cec6df08a7c0fcaa1ea301468459b46edbed693a871832298",
|
||||
"blocktime": 1514835214,
|
||||
"time": 1514835214,
|
||||
"locktime": 1205641,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "e5f81117ce7253da9bf41db26ee2e7ebeab9332d99bd4713b41806552e59d3d9",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b4fb223759753d82fd5ce833e84f62904c086b51fd2be11d7e3e9f183e2442850220079f8b3d6555610ff98da3216fa117bcb49f98e610a38471d69566ce7bc5770801210362c5e60c40f0b588216310dbb2f4a46e86038ba597f33d023ad64e66ff2e972b"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "6ab1d63def2e02ae37aa66ad729468c2005a64f35bf4f5d234d16c3e379b4e4f",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "47304402203dd8510301d68bc21169f953d2996d602f8411a309c494392b6f2bf85e5d58f102206fa2db245d15021f3b556d10747cfd8eba100fd19dfa1a0a9c5cebc58d7c22f6012103c65394a4c6705e3a13f6305e7997fb68feb192acce312a8ba144994b9a33507b"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.02942395,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914eb0f5829a547f30b3d488ab38b425c1d93afb4b888ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 25.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914883f0723e1c93db538d02c7a8d318322e655b59888ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
52
tests/rpc/testdata/monetaryunit.json
vendored
52
tests/rpc/testdata/monetaryunit.json
vendored
@ -1,52 +0,0 @@
|
||||
{
|
||||
"blockHeight": 447973,
|
||||
"blockHash": "c81fe0f3524938c618156449d27ede51c2c76b73e00e83cdb9b599181ca505d5",
|
||||
"blockTime": 1556541002,
|
||||
"blockTxs": [
|
||||
"062f1f851b5d350f860a2c96c98b6dac8030f84bb02df42b5608619abf6049c8",
|
||||
"72502137b0924c69400eec74deacc57e9290f32a6ba2f5559f17256c9c06a347"
|
||||
],
|
||||
"txDetails": {
|
||||
"72502137b0924c69400eec74deacc57e9290f32a6ba2f5559f17256c9c06a347": {
|
||||
"hex": "0100000001ac2e21335c11482009e10d78ddf0378e2e778f09ec01077d3ac7747ac4f3eae5010000004847304402201de5db6155e047897ea2fed2a8cbc1d717fb8c5b1a18964cd4942c800db1a218022035a6c8aed82c582db22f4835dbd86a283c7ed3b84eaf1f68932b910dfd08d1be01ffffffff030000000000000000008e36f7c90d00000023210219e5714cbba5933a9c09bc93330efece366f61910ee1cc38b245e420063ca3f2ac00d2496b000000001976a914a1f4fccad310761f842f3cdcc41b5ca3220fd30488ac00000000",
|
||||
"txid": "72502137b0924c69400eec74deacc57e9290f32a6ba2f5559f17256c9c06a347",
|
||||
"blocktime": 1556541002,
|
||||
"time": 1556541002,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "e5eaf3c47a74c73a7d0701ec098f772e8e37f0dd780de1092048115c33212eac",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "47304402201de5db6155e047897ea2fed2a8cbc1d717fb8c5b1a18964cd4942c800db1a218022035a6c8aed82c582db22f4835dbd86a283c7ed3b84eaf1f68932b910dfd08d1be01"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 592.22996622,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "210219e5714cbba5933a9c09bc93330efece366f61910ee1cc38b245e420063ca3f2ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 18,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a1f4fccad310761f842f3cdcc41b5ca3220fd30488ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
46
tests/rpc/testdata/myriad.json
vendored
46
tests/rpc/testdata/myriad.json
vendored
@ -1,46 +0,0 @@
|
||||
{
|
||||
"blockHeight": 20000,
|
||||
"blockHash": "a5eac2e226d40d758059c3b5041372c82f49e5df72047424187be72bab410885",
|
||||
"blockTime": 1393723468,
|
||||
"blockTxs": [
|
||||
"b5860208ff392f5c750fd4e0d5c8d647f9fc9e1d30a1b5401d3717a9fc604c16",
|
||||
"b01e2eb866ed101ed117b4ad18b753929e85c42e3d8add76bdd16e5c00519dcc",
|
||||
"834e1498be0c5b00dfa5db855f18c69aff19ff9f823b05922077c0875057bce0"
|
||||
],
|
||||
"txDetails": {
|
||||
"b01e2eb866ed101ed117b4ad18b753929e85c42e3d8add76bdd16e5c00519dcc": {
|
||||
"hex": "0100000001163465df9bb21d89e90056f11887a398d5a313aef71e3974306459661a91588c000000006b4830450220129c9e9a27406796f3f7d7edcc446037b38ddb3ef94745cec8e7cde618a811140221008eb3b893cdd3725e99b74c020867821e1f74199065260586f5ef3c22b133dd2a012103e2e23d38dc8fa493cde4077f650ab9f22eacafd14a10b123994f38c9f35dfee9ffffffff025e90ec28050000001976a9141cba92fe1510b8c73550fd4d3e0b44acdffcd12d88ac79c268ba0a0000001976a9142f86cdfa98cac89143cf9e3d309cc072caccdf6f88ac00000000",
|
||||
"txid": "b01e2eb866ed101ed117b4ad18b753929e85c42e3d8add76bdd16e5c00519dcc",
|
||||
"blocktime": 1393723468,
|
||||
"time": 1393723468,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "8c58911a6659643074391ef7ae13a3d598a38718f15600e9891db29bdf653416",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4830450220129c9e9a27406796f3f7d7edcc446037b38ddb3ef94745cec8e7cde618a811140221008eb3b893cdd3725e99b74c020867821e1f74199065260586f5ef3c22b133dd2a012103e2e23d38dc8fa493cde4077f650ab9f22eacafd14a10b123994f38c9f35dfee9"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 221.61428574,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9141cba92fe1510b8c73550fd4d3e0b44acdffcd12d88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 460.77100665,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9142f86cdfa98cac89143cf9e3d309cc072caccdf6f88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
73
tests/rpc/testdata/namecoin.json
vendored
73
tests/rpc/testdata/namecoin.json
vendored
@ -1,73 +0,0 @@
|
||||
{
|
||||
"blockHeight": 404680,
|
||||
"blockHash": "920fe53b840111f7e593d93ba58dc54e043e10f8fa4a678e86a98f5cb5b29614",
|
||||
"blockTime": 1530003649,
|
||||
"blockTxs": [
|
||||
"80b8477d10df9ece7d8dde2d30817e2855af1fb66b7a9ac860e592118ae33f5f",
|
||||
"afcd8e3638b11b1ce52055474dcce78c4129e95ebee3305574acda48deea8a65",
|
||||
"6ab2278f25fe3ce914fb49ad79679cdb337c0d38211a865db126ca90c6850a60",
|
||||
"88628abcb7014532daa9a084998e2f770c92e81833f4cc419e8da17bdea29a2e",
|
||||
"cf04d4d9f1ebcec2d005922628af77dad24d7d735b56befc8b60014259ebfe0f",
|
||||
"161ea9e2056c86559d5e593554dbe90c8ae8e99b2b38ce4f78866b4d586bddfc",
|
||||
"89866c18f8effe8f7b15bb2973907ec50d5e2e5d79d9c8054d2f286b66c7a318",
|
||||
"7269a55d870661d51611e91afd5963a2df69cb7cb70e55a0019128db42c07393",
|
||||
"e94ff789e7cea0a9935baae202018d41ab238e4536e397d194f307afc126fd54",
|
||||
"f144f6346a8ce5f5f350753738958b716845fdd76841f2fb691b74206de20099",
|
||||
"2b4f85cead2f60224deedf8b9a65312221ccd531c3324211a5ab7bd1e4b3592e",
|
||||
"c1b3ffdae37b61052bd7f7bd14b697402208bc6eeedffd3ef05e3b8eeeccf623",
|
||||
"25562c32931c4a5b045076609c211c0d9d9f50dd49d669c49cabd50473677fc0",
|
||||
"1e41bdcb5bc4038cd5ca6fd8fcfa115ce5ed8b4bb26849d8129a8f8cd1493f28",
|
||||
"5d84a38142d07de023114252ac8efd5172c8334818d95c71b8053544ce57f817",
|
||||
"7fe0c2a2746c1237a9b1af7a595bf56ce23bf834ac0c2a6d29b480a0a4fbd524",
|
||||
"784104089ce84977bb235b2509651677a84789c415d60eccc9dbf77be585ad9c",
|
||||
"f00c1aef90779f58ffe451ce026ab491c1750e7eedecfb65925f46b971507f88",
|
||||
"3b9c23fd6730cf2e11bc9f009db6f21f35df6b50941a46fc0a83cff423dd0695",
|
||||
"7c6f996288a7d82df333b897301267519d033d889c8490b30785d526efe3e36d",
|
||||
"fb8f9c1e3139f389ae7e21fd66bd506ae749cb303a1838b2738a4f8c63096c2b",
|
||||
"4cdd7b9596862643df7c63a5b0b0e2deaa843e8251bfc60716b94ce0cb656660",
|
||||
"435880f0d752539150dd828ebe1e4fb2ef92b3269b160278b3b98248c22036fd",
|
||||
"9a2c3c096d630c1abf2b3fa0da367d954f2213ad5d8136375d42de3cc98132d1",
|
||||
"cff4f408645e25f3f093d42684449fc51b31e897213bd98ebace7d49acdb5f4b",
|
||||
"be1370f1e514fbb0d2345ee28d274081d56267bfddc6aa64090e3af4fcce6310",
|
||||
"e422f60e56f36a03e263d8f812a99dcbc3c790f051a59ee5604e1aff97143b71",
|
||||
"5082cc9765402eb1ca84273adcd264a9fb44cc427b921e5e776252eca2c6584a",
|
||||
"08eb38fe093951404debe36ccc0e528dde6ee983c9d6f5d6752bcd160748fb7f"
|
||||
],
|
||||
"txDetails": {
|
||||
"08eb38fe093951404debe36ccc0e528dde6ee983c9d6f5d6752bcd160748fb7f": {
|
||||
"hex": "010000000101292738408181cc445a937124bad53f0c1bfeff9e7fc6fb3f1713a6f74f3a22020000006b483045022100bc7c33f785866e688e7de7cdf385dd710159e9300e7c2702dcb556433c635e4f02202c9fa4659db2648061a14ef9108424866116695367d9042e7c1234a4556e900c012103fbb34dd0aca298fb23ba79af2c007880e593b6832e75784cdba1661f110f751efeffffff02a0870300000000001976a9145090f77ac9d008d11fe1da3283486b05a15920b688ac2827760c000000001976a91404a56a80df5913d9a65095d2498db77ad3bd690f88acc62c0600",
|
||||
"txid": "08eb38fe093951404debe36ccc0e528dde6ee983c9d6f5d6752bcd160748fb7f",
|
||||
"blocktime": 1530003649,
|
||||
"time": 1530003649,
|
||||
"locktime": 404678,
|
||||
"vsize": 226,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "223a4ff7a613173ffbc67f9efffe1b0c3fd5ba2471935a44cc81814038272901",
|
||||
"vout": 2,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100bc7c33f785866e688e7de7cdf385dd710159e9300e7c2702dcb556433c635e4f02202c9fa4659db2648061a14ef9108424866116695367d9042e7c1234a4556e900c012103fbb34dd0aca298fb23ba79af2c007880e593b6832e75784cdba1661f110f751e"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00231328,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9145090f77ac9d008d11fe1da3283486b05a15920b688ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 2.09069864,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91404a56a80df5913d9a65095d2498db77ad3bd690f88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
174
tests/rpc/testdata/nuls.json
vendored
174
tests/rpc/testdata/nuls.json
vendored
@ -1,174 +0,0 @@
|
||||
{
|
||||
"blockHeight": 2092530,
|
||||
"blockHash": "002038a2301c19dec173b6776369f4985a66a4c583c7fa26ae9db7a4369643e71370",
|
||||
"blockTime": 1552392940,
|
||||
"blockSize": 290,
|
||||
"blockTxs": [
|
||||
"0020d682b3832334ed03177a7c51a0d94c6cdaee313d14e147203d55ed0f66202234",
|
||||
"0020ad9d437d9867c778c39a04c030fe941c7c07d9529cf534935471c7c8703ee7c7"
|
||||
],
|
||||
"txDetails": {
|
||||
"0020d682b3832334ed03177a7c51a0d94c6cdaee313d14e147203d55ed0f66202234": {
|
||||
"hex": "0100e069d471690100ffffffff000c170423015b98f40fb24b34d395a774aa5ea939c89999a7679e0bff0d00000000daf11f00000017042301a1bdaf958e76c84ff8a17189a6f1f4269ad4a54b7a050f0000000000daf11f00000017042301e60bf29198ed95d53013fdae781f1272a6ccdbda90d70e0000000000daf11f00000017042301751c960ae6c2f9052a53878c9e15f08ad4e79774accb130000000000daf11f00000017042301f69e4b0348458a4846f06dc4940fc1393edd3fcfea7e0e0000000000daf11f000000170423012cfbf9441677fcea3af313da99c01b485e117e9d4f5e0c0000000000daf11f00000017042301d6d33afa523fc78011aafc0c60e2e8dc45206e5676610c0000000000daf11f00000017042301e9e760b295568f955526b29e0d3a0c1dd3a1c50a4f5e0c0000000000daf11f000000170423017e8d9ff74a624f5ee2ef1a9d665385b7314c73a1750c0d0000000000daf11f000000170423012a3435e83852742f65574f297be94c48d9ab68fbb535350100000000daf11f000000170423017904ac680eb1b6a37652fe7fbc57d545d1447d48e55f0c0000000000daf11f00000017042301d2b1c26cdcb86896890bbb741e32d8057ad78cff9dbc180000000000daf11f00000000",
|
||||
"txid": "0020d682b3832334ed03177a7c51a0d94c6cdaee313d14e147203d55ed0f66202234",
|
||||
"blocktime": 1552392940,
|
||||
"time": 1552392940,
|
||||
"locktime": 2093530,
|
||||
"version": 0,
|
||||
"vin": [],
|
||||
"vout": [
|
||||
{
|
||||
"value": 2.34818462,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "NsdykbfjmZVHYNaVrKVF89UzUgPKaRa9",
|
||||
"Addresses": ["NsdykbfjmZVHYNaVrKVF89UzUgPKaRa9"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00984442,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse44mP6EJWbv9qPEPgi4sjtx8QmLzjU",
|
||||
"Addresses": ["Nse44mP6EJWbv9qPEPgi4sjtx8QmLzjU"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00972688,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse8GNwGtoBhxGmwfetqnhnMART4MVGU",
|
||||
"Addresses": ["Nse8GNwGtoBhxGmwfetqnhnMART4MVGU"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01297324,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse1KbUNjc8mEGAHgCRHXRWYR6zFa9dh",
|
||||
"Addresses": ["Nse1KbUNjc8mEGAHgCRHXRWYR6zFa9dh"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00949994,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse9HUun2HwFAypdpBkbjXbQPMkM7nQD",
|
||||
"Addresses": ["Nse9HUun2HwFAypdpBkbjXbQPMkM7nQD"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00810575,
|
||||
"n": 5,
|
||||
"scriptPubKey": {
|
||||
"hex": "NsdvtMNdncJC3q8un2DpBWacZL6YRzJp",
|
||||
"Addresses": ["NsdvtMNdncJC3q8un2DpBWacZL6YRzJp"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00811382,
|
||||
"n": 6,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse7L6F3sEGc5NRghLtkRrVGaxwgXePS",
|
||||
"Addresses": ["Nse7L6F3sEGc5NRghLtkRrVGaxwgXePS"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00810575,
|
||||
"n": 7,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse8W8pMG1E94HQSkieUYUyASBr6oRQr",
|
||||
"Addresses": ["Nse8W8pMG1E94HQSkieUYUyASBr6oRQr"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00855157,
|
||||
"n": 8,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse1uGXjbCm9JJjmL88xYhnU59B6b3GR",
|
||||
"Addresses": ["Nse1uGXjbCm9JJjmL88xYhnU59B6b3GR"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.20264373,
|
||||
"n": 9,
|
||||
"scriptPubKey": {
|
||||
"hex": "NsdviSF29wA91UtGgYuN3HL6iMWLs2hc",
|
||||
"Addresses": ["NsdviSF29wA91UtGgYuN3HL6iMWLs2hc"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00810981,
|
||||
"n": 10,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse1ZXaeJDcuteKwbxacdBnX46bzfcuQ",
|
||||
"Addresses": ["Nse1ZXaeJDcuteKwbxacdBnX46bzfcuQ"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01621149,
|
||||
"n": 11,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nse75MmS9stKYE11KCaLaVRaXHLprikS",
|
||||
"Addresses": ["Nse75MmS9stKYE11KCaLaVRaXHLprikS"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"0020ad9d437d9867c778c39a04c030fe941c7c07d9529cf534935471c7c8703ee7c7": {
|
||||
"hex": "02004a53d471690100ffffffff03230020199146789cda517776c140a8638218b8fa29e3a1857573f9463df3e6fa1f56100167537e3b680000000000000000002300208fa6362e79b40b61791dd1484b79d61c9bebf4dc4986f347ba46e65feb9ee4dc00e02c504d00000000000000000000230020fe3ca565e667bd6b2b7889c1307d2006d0ce5697d13e98311c605ca802c7ef0f00603924cb2e0200000000000000000217042301405aa9eeca8af1edae196837bde4eef29bee040600664280d1000000000000000000170423016056a17c02cd53191ce2e647c5ed02d1c70e483607cdaed3c50100000000000000006b2102f23b91b10ca411dceccf873a313399f0c3a90b14e7b0b5f43642e33da882b7bc00473045022100c2521e5951d168e43f42010e8f1ba484cb445dcdb29d066caf0bce1c78476624022074df5ccdd4eda6f3adec5420efef85d7369b9b8266bbc392f5e76eef94f0b9a9",
|
||||
"txid": "0020ad9d437d9867c778c39a04c030fe941c7c07d9529cf534935471c7c8703ee7c7",
|
||||
"blocktime": 1552392940,
|
||||
"time": 1552392934,
|
||||
"locktime": 0,
|
||||
"version": 0,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "0020199146789cda517776c140a8638218b8fa29e3a1857573f9463df3e6fa1f5610",
|
||||
"vout": 1,
|
||||
"sequence": 0,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
},
|
||||
"Addresses": ["Nsdz3WNA1bfGSmy5oYY3KGMjZSd1C61p"]
|
||||
},
|
||||
{
|
||||
"txid": "00208fa6362e79b40b61791dd1484b79d61c9bebf4dc4986f347ba46e65feb9ee4dc",
|
||||
"vout": 0,
|
||||
"sequence": 0,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
},
|
||||
"Addresses": ["Nsdz3WNA1bfGSmy5oYY3KGMjZSd1C61p"]
|
||||
},
|
||||
{
|
||||
"txid": "0020fe3ca565e667bd6b2b7889c1307d2006d0ce5697d13e98311c605ca802c7ef0f",
|
||||
"vout": 0,
|
||||
"sequence": 0,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
},
|
||||
"Addresses": ["Nsdz3WNA1bfGSmy5oYY3KGMjZSd1C61p"]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 8998.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nsdx5SBU9xN9SKz6dEwcz85WdFaNj2g4",
|
||||
"Addresses": ["Nsdx5SBU9xN9SKz6dEwcz85WdFaNj2g4"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 19491.71633415,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "Nsdz3WNA1bfGSmy5oYY3KGMjZSd1C61p",
|
||||
"Addresses": ["Nsdz3WNA1bfGSmy5oYY3KGMjZSd1C61p"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
56
tests/rpc/testdata/omotenashicoin.json
vendored
56
tests/rpc/testdata/omotenashicoin.json
vendored
@ -1,56 +0,0 @@
|
||||
{
|
||||
"blockHeight": 65856,
|
||||
"blockHash": "00000000000ef792eee81acc4c008c6d76d26780249ca04ce06e1f75a7589cc0",
|
||||
"blockTime": 1571024221,
|
||||
"blockTxs": [
|
||||
"88cc29d05f954606eb674d863cc4c574a74bf85fc18a305b22a7c7877c356ce7",
|
||||
"6f9006feb50be3d0c42d98b7c88308adae2839e45f52763826a368211935166d"
|
||||
],
|
||||
"txDetails": {
|
||||
"6f9006feb50be3d0c42d98b7c88308adae2839e45f52763826a368211935166d": {
|
||||
"hex": "01000000020f704d32f71c5fadb17036403336bb6f15563d434944974753e8c43d7880c004000000004847304402203749e06f3d3ff0cce5e5c91cdb3876cf32e4dcc12feccd4ec816cc86db6260090220546d03aa361b87c087cac86273b628dd3e1bffd93ea8b9e99d9506a627a35bde01fffffffffd215820344e8d012e7e08289310318c2caed57e36db31b711f3a722a5cfa11100000000484730440220606707fc7830306a889bb5fa549bf8e26b71b793d4d22b9ae76d37b95ace3fe1022072016086b81746d1b2a0caf12158d5f437b05ffd8b0610efe07a5672c315655701ffffffff0100c2eb0b000000001976a914f61ce564ca563d708e971db2ad24234146c377fd88ac00000000",
|
||||
"txid": "6f9006feb50be3d0c42d98b7c88308adae2839e45f52763826a368211935166d",
|
||||
"version": 1,
|
||||
"locktime": 0,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "04c080783dc4e85347974449433d56156fbb3633403670b1ad5f1cf7324d700f",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"asm": "304402203749e06f3d3ff0cce5e5c91cdb3876cf32e4dcc12feccd4ec816cc86db6260090220546d03aa361b87c087cac86273b628dd3e1bffd93ea8b9e99d9506a627a35bde01",
|
||||
"hex": "47304402203749e06f3d3ff0cce5e5c91cdb3876cf32e4dcc12feccd4ec816cc86db6260090220546d03aa361b87c087cac86273b628dd3e1bffd93ea8b9e99d9506a627a35bde01"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "11a1cfa522a7f311b731db367ed5ae2c8c31109328087e2e018d4e34205821fd",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"asm": "30440220606707fc7830306a889bb5fa549bf8e26b71b793d4d22b9ae76d37b95ace3fe1022072016086b81746d1b2a0caf12158d5f437b05ffd8b0610efe07a5672c315655701",
|
||||
"hex": "4730440220606707fc7830306a889bb5fa549bf8e26b71b793d4d22b9ae76d37b95ace3fe1022072016086b81746d1b2a0caf12158d5f437b05ffd8b0610efe07a5672c315655701"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 2,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"asm": "OP_DUP OP_HASH160 f61ce564ca563d708e971db2ad24234146c377fd OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a914f61ce564ca563d708e971db2ad24234146c377fd88ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": [
|
||||
"SjjKsmPj73iTWHUzKiXfdR46qjLdKwawkh"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"blockhash": "00000000000ef792eee81acc4c008c6d76d26780249ca04ce06e1f75a7589cc0",
|
||||
"confirmations": 0,
|
||||
"time": 1571024221,
|
||||
"blocktime": 1571024221
|
||||
}
|
||||
}
|
||||
}
|
||||
69
tests/rpc/testdata/omotenashicoin_testnet.json
vendored
69
tests/rpc/testdata/omotenashicoin_testnet.json
vendored
@ -1,69 +0,0 @@
|
||||
{
|
||||
"blockHeight": 1234,
|
||||
"blockHash": "0000000b65c99d7864c506cdfaf0daedad8d651c9fa8f72479c771ae76804839",
|
||||
"blockTime": 1579761404,
|
||||
"blockTxs": [
|
||||
"2c1c0368fb06443c61dca97ed74107555854bdf9b5a03d89e1958d657e1e32cb",
|
||||
"f072e70a187bdc321399644612ee7076f82e541a4905b458fcb1d1e18f78287b"
|
||||
],
|
||||
"txDetails": {
|
||||
"f072e70a187bdc321399644612ee7076f82e541a4905b458fcb1d1e18f78287b": {
|
||||
"hex": "01000000025ca81ee15d6ffe0343dfe93c027c4663ef0ea939b79f56db9734840ac1adf7f40000000049483045022100b036866dcffe2a0a503f6c8f1e8f2e264f549c2980598d69cf2364ef166a0c3102203b8050fe7b1b04a4469b5012c03240fb840f894c82e653903d405b4ff746ecb801ffffffffcaa1a7123f477980412d97f350e3f20d53cd26c48c3dceefc0acbc7af0949f0100000000484730440220449315f1aafa884f4c49138386d5bc8f9b2f9641b13a66fdbfc106986014c5580220219f9a08d62d39ff8adc893249fc479e9ccd9aa2902f7b2050e62381621f076e01ffffffff020cdc7648170000001976a9143901f589f1c60a361b4d7f92f2296259ced577bb88ac00e87648170000001976a91428904c18fb5423f5c3995359b27067d92ff85af388ac00000000",
|
||||
"txid": "f072e70a187bdc321399644612ee7076f82e541a4905b458fcb1d1e18f78287b",
|
||||
"version": 1,
|
||||
"locktime": 0,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "f4f7adc10a843497db569fb739a90eef63467c023ce9df4303fe6f5de11ea85c",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"asm": "3045022100b036866dcffe2a0a503f6c8f1e8f2e264f549c2980598d69cf2364ef166a0c3102203b8050fe7b1b04a4469b5012c03240fb840f894c82e653903d405b4ff746ecb801",
|
||||
"hex": "483045022100b036866dcffe2a0a503f6c8f1e8f2e264f549c2980598d69cf2364ef166a0c3102203b8050fe7b1b04a4469b5012c03240fb840f894c82e653903d405b4ff746ecb801"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "019f94f07abcacc0efce3d8cc426cd530df2e350f3972d418079473f12a7a1ca",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"asm": "30440220449315f1aafa884f4c49138386d5bc8f9b2f9641b13a66fdbfc106986014c5580220219f9a08d62d39ff8adc893249fc479e9ccd9aa2902f7b2050e62381621f076e01",
|
||||
"hex": "4730440220449315f1aafa884f4c49138386d5bc8f9b2f9641b13a66fdbfc106986014c5580220219f9a08d62d39ff8adc893249fc479e9ccd9aa2902f7b2050e62381621f076e01"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 999.9999694,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"asm": "OP_DUP OP_HASH160 3901f589f1c60a361b4d7f92f2296259ced577bb OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a9143901f589f1c60a361b4d7f92f2296259ced577bb88ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": [
|
||||
"aVFVb55LQ9rSjHC19KYPUj3eGyQkXYzcRr"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"asm": "OP_DUP OP_HASH160 28904c18fb5423f5c3995359b27067d92ff85af3 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a91428904c18fb5423f5c3995359b27067d92ff85af388ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": [
|
||||
"aTkYcdqUeREo8g9ydvpDPACzzcChy3zpiw"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"blockhash": "0000000b65c99d7864c506cdfaf0daedad8d651c9fa8f72479c771ae76804839",
|
||||
"confirmations": 0,
|
||||
"time": 1579761404,
|
||||
"blocktime": 1579761404
|
||||
}
|
||||
}
|
||||
}
|
||||
40
tests/rpc/testdata/pivx.json
vendored
40
tests/rpc/testdata/pivx.json
vendored
@ -1,40 +0,0 @@
|
||||
{
|
||||
"blockHeight": 863801,
|
||||
"blockHash": "84c3697c0a0cfdeb8499d69da97151ed8babfd44cdf59d5b7d5e2dcc4870bdf9",
|
||||
"blockTime": 1508218661,
|
||||
"blockTxs": [
|
||||
"64215f794d731e78714de663cdb83e2cf233800e5d4d2cc3d4c235bc4301651f",
|
||||
"275915c605b5581acaaa5757b05a8a38c1e1aa6be49a8ab051301db9c8fac502",
|
||||
"ffcbfcea3a996e2496bb29bfd3462f1d8a9d55302f44545984830f0a455e79bf",
|
||||
"bd4cfa6d63326dd1bf881cdc46f77e96efcef54e39d2b4e34749ecf65c26e772"
|
||||
],
|
||||
"txDetails": {
|
||||
"64215f794d731e78714de663cdb83e2cf233800e5d4d2cc3d4c235bc4301651f": {
|
||||
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0603392e0d0101ffffffff0100000000000000000000000000",
|
||||
"txid": "64215f794d731e78714de663cdb83e2cf233800e5d4d2cc3d4c235bc4301651f",
|
||||
"version": 1,
|
||||
"locktime": 0,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "03392e0d0101",
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"asm": "",
|
||||
"hex": "",
|
||||
"type": "nonstandard"
|
||||
}
|
||||
}
|
||||
],
|
||||
"blockhash": "84c3697c0a0cfdeb8499d69da97151ed8babfd44cdf59d5b7d5e2dcc4870bdf9",
|
||||
"time": 1508218661,
|
||||
"blocktime": 1508218661,
|
||||
"confirmations": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
40
tests/rpc/testdata/polis.json
vendored
40
tests/rpc/testdata/polis.json
vendored
@ -1,40 +0,0 @@
|
||||
{
|
||||
"blockHeight": 308506,
|
||||
"blockHash": "7db10f77c97acf921cb57843b0155657b57de674cd914802ce3320f52d478dfe",
|
||||
"blockTime": 1552686920,
|
||||
"blockTxs": [
|
||||
"319a7c8bcec7951931b79eade2985362c41b827f3fd013dedfe9b1a96fa57a03",
|
||||
"7780a2a8fb2356ecfaaf556ff53ba93a46cdce3bd93be8256a7e304f404600bc",
|
||||
"17f243fa49f5316062d650b20ce37d6dd795e46ed9fd4f64c9b4ccf689915d9b",
|
||||
"72270d839f189d1193953e1450a31b620ba255a6d664c8a9a0386f8b8e2800f1"
|
||||
],
|
||||
"txDetails": {
|
||||
"17f243fa49f5316062d650b20ce37d6dd795e46ed9fd4f64c9b4ccf689915d9b": {
|
||||
"hex": "0200000001adc444b348621c06d881f6d1402fcb188316163c0c510d845b71cfc3a9ee1101010000006b483045022100e8378228debfddf315ebbc4a7455bfa3fceb8ae577c176e760f73c4be9ba781702201081481c27b72a9d2f8826f20e6289323276288a96181866821111c805d9305701210230ffa39fe697cc4d28d453ed84ed6545b9ce83a0863367b831dae54674488967ffffffff01f89bb0b0000000001976a914a738d8ab602e40c83c1d617aa3075b1954312d7988ac00000000",
|
||||
"txid": "17f243fa49f5316062d650b20ce37d6dd795e46ed9fd4f64c9b4ccf689915d9b",
|
||||
"blocktime": 1552686920,
|
||||
"time": 1552686920,
|
||||
"locktime": 0,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "0111eea9c3cf715b840d510c3c16168318cb2f40d1f681d8061c6248b344c4ad",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100e8378228debfddf315ebbc4a7455bfa3fceb8ae577c176e760f73c4be9ba781702201081481c27b72a9d2f8826f20e6289323276288a96181866821111c805d9305701210230ffa39fe697cc4d28d453ed84ed6545b9ce83a0863367b831dae54674488967"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 29.64364280,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a738d8ab602e40c83c1d617aa3075b1954312d7988ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
170
tests/rpc/testdata/qtum.json
vendored
170
tests/rpc/testdata/qtum.json
vendored
@ -1,170 +0,0 @@
|
||||
{
|
||||
"blockHeight": 333514,
|
||||
"blockHash": "249208b04314e1541c15d7676f09d2a47f8ea7be69b0271678304c5312d44873",
|
||||
"blockTime": 1552272592,
|
||||
"blockTxs": [
|
||||
"1dbdf1b25e3e85fc62158112468e65dba5d63b3824878650809a9718e71174eb",
|
||||
"a391909c9521ee8e4489705366bf0bcddf84d8a34726ddfd503854ae4cdb4654"
|
||||
],
|
||||
"txDetails": {
|
||||
"1dbdf1b25e3e85fc62158112468e65dba5d63b3824878650809a9718e71174eb": {
|
||||
"hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff0503ca160500ffffffff020000000000000000000000000000000000266a24aa21a9ed598bdca4eab6001d5753ba33e9a50b1986649f4b477948b5f761decd6b742b4e0120000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"txid": "1dbdf1b25e3e85fc62158112468e65dba5d63b3824878650809a9718e71174eb",
|
||||
"blocktime": 1552272592,
|
||||
"time": 1552272592,
|
||||
"locktime": 0,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "03ca160500",
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "",
|
||||
"type": "nonstandard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "6a24aa21a9ed598bdca4eab6001d5753ba33e9a50b1986649f4b477948b5f761decd6b742b4e"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"a391909c9521ee8e4489705366bf0bcddf84d8a34726ddfd503854ae4cdb4654": {
|
||||
"hex": "0200000001bb1bddb412ba1deda03d139889fc892e395d9ae20e5f956d8acb23ae64dc530401000000484730440220243bfff81362d09ee38fda1ac381905fef9af24cf3240a15c14985978c4cccee02204220fa5157693bfa01dd8a3b94ac23b35ba5bad20ff0f8f34c2a248ffacc4f8201ffffffff0b000000000000000000802c8c630400000023210254aaf2f2a7e1de6ff886fdd25ed92d472ecbf6aba7959fcc84079faef9fd0ee0ac005a6202000000001976a914a9f8f3b055324f6b2d6bcac328ec2d7e3cd22d8b88ac005a6202000000001976a914e05a3073deebefc491f782c8af8ad2899a6bf36388ac005a6202000000001976a914dbb6c84e8c0ea78482cc1db809d37572a8bf748e88ac005a6202000000001976a91423158af7bb43843d05bab9210917b9063413a3ae88ac005a6202000000001976a91490d7395c53fb6047a2ff7c7e2b42527ebc81832288ac005a6202000000001976a9140fb6d44794ae58756164b3377c3512286511840488ac005a6202000000001976a91453f6dc6a60a98921a3d72aea5dba2aefb6d7bd3888ac005a6202000000001976a914f94467916b9e0d985f90722e0d6f5b65846dfb5e88ac005a6202000000001976a91453f6dc6a60a98921a3d72aea5dba2aefb6d7bd3888ac00000000",
|
||||
"txid": "a391909c9521ee8e4489705366bf0bcddf84d8a34726ddfd503854ae4cdb4654",
|
||||
"blocktime": 1552272592,
|
||||
"time": 1552272592,
|
||||
"locktime": 0,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "0453dc64ae23cb8a6d955f0ee29a5d392e89fc8998133da0ed1dba12b4dd1bbb",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220243bfff81362d09ee38fda1ac381905fef9af24cf3240a15c14985978c4cccee02204220fa5157693bfa01dd8a3b94ac23b35ba5bad20ff0f8f34c2a248ffacc4f8201"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "",
|
||||
"type": "nonstandard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 188.50000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "210254aaf2f2a7e1de6ff886fdd25ed92d472ecbf6aba7959fcc84079faef9fd0ee0ac",
|
||||
"addresses": [
|
||||
"Qd3xCT4kKgTDw85vqgr1jXyHq3GqZvurpa"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a9f8f3b055324f6b2d6bcac328ec2d7e3cd22d8b88ac",
|
||||
"addresses": [
|
||||
"Qc6iYCZWn4BauKXGYirRG8pMtgdHMk2dzn"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e05a3073deebefc491f782c8af8ad2899a6bf36388ac",
|
||||
"addresses": [
|
||||
"Qh4FWjExZZj4v81xeLPG6oLB2tTnLt8BMQ"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914dbb6c84e8c0ea78482cc1db809d37572a8bf748e88ac",
|
||||
"addresses": [
|
||||
"Qgdj4FrXXxLVkxPDYtFNNGZNd9TJrNjtpM"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 5,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91423158af7bb43843d05bab9210917b9063413a3ae88ac",
|
||||
"addresses": [
|
||||
"QPoVZqSCxtWkHgNt8jkipv6KNJUMmE7gRT"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 6,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91490d7395c53fb6047a2ff7c7e2b42527ebc81832288ac",
|
||||
"addresses": [
|
||||
"QZoqExD34XsaPyx61AmTRTLfSzwYK6pXXY"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 7,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9140fb6d44794ae58756164b3377c3512286511840488ac",
|
||||
"addresses": [
|
||||
"QN35GNbDzzMAHLWBvej9vGucFLpZMoVz6N"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 8,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91453f6dc6a60a98921a3d72aea5dba2aefb6d7bd3888ac",
|
||||
"addresses": [
|
||||
"QUFwvRXTnjnWmGVYxaXZoEAmMkKtkth8ND"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 9,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914f94467916b9e0d985f90722e0d6f5b65846dfb5e88ac",
|
||||
"addresses": [
|
||||
"QjKzJtymBHQfuc7zGU6LSE1eHfJr2dFXpE"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.40000000,
|
||||
"n": 10,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91453f6dc6a60a98921a3d72aea5dba2aefb6d7bd3888ac",
|
||||
"addresses": [
|
||||
"QUFwvRXTnjnWmGVYxaXZoEAmMkKtkth8ND"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
119
tests/rpc/testdata/ravencoin.json
vendored
119
tests/rpc/testdata/ravencoin.json
vendored
@ -1,119 +0,0 @@
|
||||
{
|
||||
"blockHeight": 707554,
|
||||
"blockHash": "000000000000429dbd10e090e00384199e85555d501cfa47720e5261c66942a6",
|
||||
"blockTime": 1557858845,
|
||||
"blockTxs": [
|
||||
"194a89653371595337c306e559d71a94a72f3395c8801189cb396ce6330636cd",
|
||||
"58ce37e86e5c17e3c08ef14c55d994aaf4c11003fd749aa597b141c89d22c582",
|
||||
"9d3e19d6f147c362410fa361b0cae9690e8de1c727e7a99bc145e7d95580a314",
|
||||
"739b0ef5a5d8314f84f61105b107b7534dc9748b288fcd06dc8087783ce26e20"
|
||||
],
|
||||
"txDetails": {
|
||||
"58ce37e86e5c17e3c08ef14c55d994aaf4c11003fd749aa597b141c89d22c582": {
|
||||
"hex": "02000000025496421e6a3627ec4a5eab571ff22b3a1a5aa7555d48b7013976eef18443a115000000006a473044022027e2ef2d5057e03864373e6a3bbf8206af18bd64c817a42979f784688a703c4d02203230b32182046d01a16ea765f85219fd3ba8b2d731eb4a0446d968da170da5a5012102f721c9e757b10fe342869b92ba76c4fbcc74d634fc9536b9c068fc033488d655feffffff886c20d01cc0647f0bff7fea3506d88fd7a49dcc17de2938846f6a52055d1f6e800000006b483045022100cf6c8d2452c5f146e317a77ccafdf6cb516c3050f9d6e71d0d834db8a02d1cc7022041823ee041589a1fcdb43d5ce121cb6470506f6726a4f667d6d20af894a034260121035e5dfde430f2d5f832c4df4a9a251293b0ba29995aee49a6908586de22cbc8c3feffffff0295117782570600001976a9147f7d88fa55fab938161953faf6bd3d026cd078dc88acf2420f00000000001976a914e8fd48114696f4e6ee5b3e5d532c408a19f691b788ac92cb0a00",
|
||||
"txid": "58ce37e86e5c17e3c08ef14c55d994aaf4c11003fd749aa597b141c89d22c582",
|
||||
"blocktime": 1557858845,
|
||||
"time": 1557858845,
|
||||
"locktime": 707474,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "15a14384f1ee763901b7485d55a75a1a3a2bf21f57ab5e4aec27366a1e429654",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "473044022027e2ef2d5057e03864373e6a3bbf8206af18bd64c817a42979f784688a703c4d02203230b32182046d01a16ea765f85219fd3ba8b2d731eb4a0446d968da170da5a5012102f721c9e757b10fe342869b92ba76c4fbcc74d634fc9536b9c068fc033488d655"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "6e1f5d05526a6f843829de17cc9da4d78fd80635ea7fff0b7f64c01cd0206c88",
|
||||
"vout": 128,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100cf6c8d2452c5f146e317a77ccafdf6cb516c3050f9d6e71d0d834db8a02d1cc7022041823ee041589a1fcdb43d5ce121cb6470506f6726a4f667d6d20af894a034260121035e5dfde430f2d5f832c4df4a9a251293b0ba29995aee49a6908586de22cbc8c3"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 69729.20762773,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9147f7d88fa55fab938161953faf6bd3d026cd078dc88ac",
|
||||
"addresses": [
|
||||
"RLuJHD2GRHzTbwc47Cg43oAJQZRMMVcU7S"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01000178,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e8fd48114696f4e6ee5b3e5d532c408a19f691b788ac",
|
||||
"addresses": [
|
||||
"RWX8GL2MHTewUvEcJMwu1cSZEhrSitG9Nz"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"9d3e19d6f147c362410fa361b0cae9690e8de1c727e7a99bc145e7d95580a314": {
|
||||
"hex": "0200000004152c754032d6d014e21a10f68cd0d1f62b29ad3997bc637f434f513240a6393a370000006b483045022100f397fe990bc6871408a8178a4cac7afc27a989abd8dc32536d4b392e2d46d7d502205aafc72f6b76bfee3373da3786492c8d24107d1005751f25e6be4f8788d85a8e012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35dfeffffff1d8cedc545c969e9fe0b74465c47081bc25d9c423a1668c9ede948c5627aa78f020000006a4730440220580ccb55105732dca7ae5e338c9d9af1651c1d8a9d167a0dfea41b977c38f67502205a5fe94fb9190a97f8bff5ee94e603323da36c0383a1d6fbf27b499bf900a24d012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35dfeffffffb832371edbbd6ae9498ec3f33cc61333d1cfb0497f4600cbc0a05ceae82e39e7640000006b483045022100906a567b719038f7b5e0750e5c8ff4b1356dd28ecd867edfb7bf65623b50c64d02203bfe4bd0d08b4caff78112aa63bb4fbfb6804c428488dd5ac30266f0f2ba1fa9012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35dfeffffffc20447c40b451c4ccb643863a3d06ecbf96681d8f5dace42a80a0e1b7627ec62660000006b483045022100e9912569e224fee0f9febfc1a9356918229461d323c891d93b21e2396bf8e3e2022053c814c6661b3fdabc838d0ea77585b9c340f659fbe902dc5cf7559939350756012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35dfeffffff0269ef8a00000000001976a9148273705545d167297b7278503447d809d9e84b2e88ac003c9476520200001976a9147cf41bc3cdba1b8edf811877ab1cc9493847a3e488ace0cb0a00",
|
||||
"txid": "9d3e19d6f147c362410fa361b0cae9690e8de1c727e7a99bc145e7d95580a314",
|
||||
"blocktime": 1557858845,
|
||||
"time": 1557858845,
|
||||
"locktime": 707552,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "3a39a64032514f437f63bc9739ad292bf6d1d08cf6101ae214d0d63240752c15",
|
||||
"vout": 55,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100f397fe990bc6871408a8178a4cac7afc27a989abd8dc32536d4b392e2d46d7d502205aafc72f6b76bfee3373da3786492c8d24107d1005751f25e6be4f8788d85a8e012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "8fa77a62c548e9edc968163a429c5dc21b08475c46740bfee969c945c5ed8c1d",
|
||||
"vout": 2,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220580ccb55105732dca7ae5e338c9d9af1651c1d8a9d167a0dfea41b977c38f67502205a5fe94fb9190a97f8bff5ee94e603323da36c0383a1d6fbf27b499bf900a24d012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "e7392ee8ea5ca0c0cb00467f49b0cfd13313c63cf3c38e49e96abddb1e3732b8",
|
||||
"vout": 100,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100906a567b719038f7b5e0750e5c8ff4b1356dd28ecd867edfb7bf65623b50c64d02203bfe4bd0d08b4caff78112aa63bb4fbfb6804c428488dd5ac30266f0f2ba1fa9012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "62ec27761b0e0aa842cedaf5d88166f9cb6ed0a3633864cb4c1c450bc44704c2",
|
||||
"vout": 102,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100e9912569e224fee0f9febfc1a9356918229461d323c891d93b21e2396bf8e3e2022053c814c6661b3fdabc838d0ea77585b9c340f659fbe902dc5cf7559939350756012103f8a3801f6e45a63821c41c8cd5baa1aca5760e2dac0edce67ea1721e3a63a35d"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.09105257,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9148273705545d167297b7278503447d809d9e84b2e88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 25532.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9147cf41bc3cdba1b8edf811877ab1cc9493847a3e488ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
96
tests/rpc/testdata/ritocoin.json
vendored
96
tests/rpc/testdata/ritocoin.json
vendored
@ -1,96 +0,0 @@
|
||||
{
|
||||
"blockHeight": 250567,
|
||||
"blockHash": "000000000063732fe43aa186a706840650e1ca8d5518dedcc604102009092d64",
|
||||
"blockTime": 1558652720,
|
||||
"blockTxs": [
|
||||
"547b7b60419826cda46c97ad95b8679fc5a3ef1ef8749ed97bf7080502154937",
|
||||
"ad3e7e11991bafa0740cc17f3fe82e855000c7232122a11a66b27ba50884c71b",
|
||||
"1a395298cc0ec3100eb0bda8f10c8d4250ddd54b3ed9af5d3f76b9c88e2b729a"
|
||||
],
|
||||
"txDetails": {
|
||||
"ad3e7e11991bafa0740cc17f3fe82e855000c7232122a11a66b27ba50884c71b": {
|
||||
"hex": "0200000002e7a41b106da1d8357084474789f01ec65cf6a2ef4a58a19af97ee2ef03fd15b2010000006a47304402202f8ce8b00ab0c171c8a03d0d4bc65fc8f01d8c3038c3b606aa12d8816401ef7002204f2fc6a420d145668a6e3938a6adb378d49f0522c5c8d411e648600f90fb456e0121038860094e22ebae773256eb3e8a60754d05d12bd3ce6c1c77e37140713049ea0ffeffffffe88d7bdb44740939e74fffbb20db4abdf6dc964431692fbb105a32d916e83e391e0000006b483045022100839e7bf9c4eccaac0bb5a0f8eaaf9e72cbc4240207474e3d99d74115de6f6485022036d3816b1ac6569c373651370025c9dc69e879b494cdb80cb9bf46169b2c6ffc0121024822b76de8e48d8341df11da5b811c36a93b4956c90051405b6ae3e9f61ddd17feffffff020d420539000000001976a914b6accf94c24319889682506eeee546b4d413ea4588ac2f695000000000001976a91493e725537f01c352f28c6a307778800ae024b79688acc6d20300",
|
||||
"txid": "ad3e7e11991bafa0740cc17f3fe82e855000c7232122a11a66b27ba50884c71b",
|
||||
"blocktime": 1558652720,
|
||||
"time": 1558652720,
|
||||
"locktime": 250566,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "b215fd03efe27ef99aa1584aefa2f65cc61ef0894747847035d8a16d101ba4e7",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202f8ce8b00ab0c171c8a03d0d4bc65fc8f01d8c3038c3b606aa12d8816401ef7002204f2fc6a420d145668a6e3938a6adb378d49f0522c5c8d411e648600f90fb456e0121038860094e22ebae773256eb3e8a60754d05d12bd3ce6c1c77e37140713049ea0f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "393ee816d9325a10bb2f69314496dcf6bd4adb20bbff4fe739097444db7b8de8",
|
||||
"vout": 30,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100839e7bf9c4eccaac0bb5a0f8eaaf9e72cbc4240207474e3d99d74115de6f6485022036d3816b1ac6569c373651370025c9dc69e879b494cdb80cb9bf46169b2c6ffc0121024822b76de8e48d8341df11da5b811c36a93b4956c90051405b6ae3e9f61ddd17"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 9.56645901,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b6accf94c24319889682506eeee546b4d413ea4588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.05269807,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91493e725537f01c352f28c6a307778800ae024b79688ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"1a395298cc0ec3100eb0bda8f10c8d4250ddd54b3ed9af5d3f76b9c88e2b729a": {
|
||||
"hex": "0200000002610a01e927b3c771e545c73312bd1e8cbcdcce4bb5e4cfa528f7acaaaaeb5007000000006b483045022100f0deb144cf2f8a4a3c99acce5208d2b4a93cd8c5d870905a2e71c4dd80e3ca8b022046d7a612043c610eaca100097960cf202751d4c0598c41063cf51c7648e56b43012103d0804494a2616ea51b39f047b6ede43660874b511cb1c5f75ad2a8c208c3c887feffffff72d03c659bd35d40818411eeced6525d6c15cdc7f55533e253d7961eee2c1f14000000006b4830450221008c2773819fd972eee4d51105f4b43a363dfb9c45eb897f97e5780f93d685dd9a0220049fd5eb3856a26c39698f53cc8ae1e701894680b556cce5202077a266f0447801210219c8273f88355218bcd57f41b1e1af97826cf98a63ec2559d6a4a1002e198bb1feffffff02486cfe52110400001976a914b6accf94c24319889682506eeee546b4d413ea4588accd841100000000001976a91483b5b7c1b97fbe29d83b0171ebe4f4d05fb7869b88acc6d20300",
|
||||
"txid": "1a395298cc0ec3100eb0bda8f10c8d4250ddd54b3ed9af5d3f76b9c88e2b729a",
|
||||
"blocktime": 1558652720,
|
||||
"time": 1558652720,
|
||||
"locktime": 250566,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "0750ebaaaaacf728a5cfe4b54bcedcbc8c1ebd1233c745e571c7b327e9010a61",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100f0deb144cf2f8a4a3c99acce5208d2b4a93cd8c5d870905a2e71c4dd80e3ca8b022046d7a612043c610eaca100097960cf202751d4c0598c41063cf51c7648e56b43012103d0804494a2616ea51b39f047b6ede43660874b511cb1c5f75ad2a8c208c3c887"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "141f2cee1e96d753e23355f5c7cd156c5d52d6ceee118481405dd39b653cd072",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221008c2773819fd972eee4d51105f4b43a363dfb9c45eb897f97e5780f93d685dd9a0220049fd5eb3856a26c39698f53cc8ae1e701894680b556cce5202077a266f0447801210219c8273f88355218bcd57f41b1e1af97826cf98a63ec2559d6a4a1002e198bb1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 44724.53360712,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b6accf94c24319889682506eeee546b4d413ea4588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01148109,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91483b5b7c1b97fbe29d83b0171ebe4f4d05fb7869b88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
150
tests/rpc/testdata/snowgem.json
vendored
150
tests/rpc/testdata/snowgem.json
vendored
@ -1,150 +0,0 @@
|
||||
{
|
||||
"blockHeight":917888,
|
||||
"blockHash":"00000662d02c2fcf3dd53f38a551db8e01e06cd1f6e26567cbaf1100208feba4",
|
||||
"blockTime":1569520212,
|
||||
"blockTxs":[
|
||||
"fbbd4595cc152ee19d3f160dccfca5af7589dfad8e5867e671b5ae8dfe434533",
|
||||
"b1ab0b7bc4f30dea352ba6b641777d0ed6157027625aacb36da1c5eedc28e157",
|
||||
"3d5b131f9e39070d595a89ac09426f62f8ea914e6af3a0ff0c592c9f9a9a68af",
|
||||
"0fc8c13e18de2c4f95ce5651dd9386b75da679570c27d9b458cbe3e0340a71c3",
|
||||
"fc192471f04051fcdf2669273c54c3ce75c472e312a2af0f885bd8bd8d718bf8"
|
||||
],
|
||||
"txDetails":{
|
||||
"b1ab0b7bc4f30dea352ba6b641777d0ed6157027625aacb36da1c5eedc28e157":{
|
||||
"hex":"0400008085202f8901d79a4bae6a56937ddbe26fa44ad8eedc389a415fcbbf75a46ef1500cd0837e5d000000006a47304402207d7268375db5a1544368fa9a3c4e77244bc36c3ecf18b21a409f267f1436aac802202e0d7f4abafab362607d70c88a35cc50bfb4f5643d9f8d5208f5db0862946dd2012103af4c37554efb4420c42edc2f7a84e3e687dc050a832afb6ac5bcc12cfb903fbffeffffff0584f1f81f000000001976a914b38cf949ff45875224793172f8333c43e657e3e888aca61ef369000000001976a914559f99e0b3f83666cb0ef0b55c1c367b68e1d65988ac20d55023000000001976a9147a7b884e38d58bbfffbec0a0f0bee44336ca1e8a88ac205c5071000000001976a9149d0da224652d49091082f0b1c2e2b713cbceb47a88ac20d55023000000001976a91406a5e5f229d7bfd6b979747c92e6e1f6dcc95c3488ac74010e0093010e000000000000000000000000",
|
||||
"txid":"b1ab0b7bc4f30dea352ba6b641777d0ed6157027625aacb36da1c5eedc28e157",
|
||||
"blocktime":1569520212,
|
||||
"time":1569520212,
|
||||
"locktime":917876,
|
||||
"version":4,
|
||||
"vin":[
|
||||
{
|
||||
"txid":"5d7e83d00c50f16ea475bfcb5f419a38dceed84aa46fe2db7d93566aae4b9ad7",
|
||||
"vout":0,
|
||||
"sequence":4294967294,
|
||||
"n":0,
|
||||
"scriptSig":{
|
||||
"hex":"47304402207d7268375db5a1544368fa9a3c4e77244bc36c3ecf18b21a409f267f1436aac802202e0d7f4abafab362607d70c88a35cc50bfb4f5643d9f8d5208f5db0862946dd2012103af4c37554efb4420c42edc2f7a84e3e687dc050a832afb6ac5bcc12cfb903fbf",
|
||||
"asm":"304402207d7268375db5a1544368fa9a3c4e77244bc36c3ecf18b21a409f267f1436aac802202e0d7f4abafab362607d70c88a35cc50bfb4f5643d9f8d5208f5db0862946dd2[ALL] 03af4c37554efb4420c42edc2f7a84e3e687dc050a832afb6ac5bcc12cfb903fbf"
|
||||
},
|
||||
"addr":"s1YHHWM4vUV6fDHv4CgUG2Uj3b2s9fe5FFw",
|
||||
"valueZat":5400041445,
|
||||
"value":54.00041445,
|
||||
"doubleSpentTxID":null
|
||||
}
|
||||
],
|
||||
"vout":[
|
||||
{
|
||||
"value":"5.36408452",
|
||||
"n":0,
|
||||
"scriptPubKey":{
|
||||
"hex":"76a914b38cf949ff45875224793172f8333c43e657e3e888ac",
|
||||
"asm":"OP_DUP OP_HASH160 b38cf949ff45875224793172f8333c43e657e3e8 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses":[
|
||||
"s1da844qW7tuQvbtqMERetbCYuqnHwy5k9L"
|
||||
],
|
||||
"type":"pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value":"17.77540774",
|
||||
"n":1,
|
||||
"scriptPubKey":{
|
||||
"hex":"76a914559f99e0b3f83666cb0ef0b55c1c367b68e1d65988ac",
|
||||
"asm":"OP_DUP OP_HASH160 559f99e0b3f83666cb0ef0b55c1c367b68e1d659 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses":[
|
||||
"s1V1UrHL8MFmUB8cEfrfaLhjxo8FA4D9w5W"
|
||||
],
|
||||
"type":"pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value":"5.92500000",
|
||||
"n":2,
|
||||
"scriptPubKey":{
|
||||
"hex":"76a9147a7b884e38d58bbfffbec0a0f0bee44336ca1e8a88ac",
|
||||
"asm":"OP_DUP OP_HASH160 7a7b884e38d58bbfffbec0a0f0bee44336ca1e8a OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses":[
|
||||
"s1YNNeHbZZW4biHAKj8G9HyA7QwHDrWPo7C"
|
||||
],
|
||||
"type":"pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value":"19.01091872",
|
||||
"n":3,
|
||||
"scriptPubKey":{
|
||||
"hex":"76a9149d0da224652d49091082f0b1c2e2b713cbceb47a88ac",
|
||||
"asm":"OP_DUP OP_HASH160 9d0da224652d49091082f0b1c2e2b713cbceb47a OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses":[
|
||||
"s1bXAe5ZFY69SH4NckixTFfJjYaApyCWzkb"
|
||||
],
|
||||
"type":"pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value":"5.92500000",
|
||||
"n":4,
|
||||
"scriptPubKey":{
|
||||
"hex":"76a91406a5e5f229d7bfd6b979747c92e6e1f6dcc95c3488ac",
|
||||
"asm":"OP_DUP OP_HASH160 06a5e5f229d7bfd6b979747c92e6e1f6dcc95c34 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses":[
|
||||
"s1Mou1fHFBFDaW54DtBJFG6iYNKMe55gi8x"
|
||||
],
|
||||
"type":"pubkeyhash"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"3d5b131f9e39070d595a89ac09426f62f8ea914e6af3a0ff0c592c9f9a9a68af":{
|
||||
"hex":"0400008085202f890156b8879f14dcc4290d211a0ff14b7e91e55c67e7e776bc84cd69d712c025eef9000000006a4730440220144962d60a9aa0ebcf588bd2e6e2318688638ebcd304ab6f8e1d885a8519584102204f7f79bc5a20d19e5cc8cb30d4a540abe6a4c5899687f8165ea4f2aecf37dfae01210249172fff41eb94f01fb91c40aa833a8f448dcb1e04a9ca4eda609448cd62f6a8feffffff02d3952606000000001976a9141b94f6e3fc8601a3d9c059548e880c50738603db88ac691e868c000000001976a914f1af4ea3681f7d71cb7eaf55d899b9b78b1e095f88ac75010e0094010e000000000000000000000000",
|
||||
"txid":"3d5b131f9e39070d595a89ac09426f62f8ea914e6af3a0ff0c592c9f9a9a68af",
|
||||
"blocktime":1569520212,
|
||||
"time":1569520212,
|
||||
"locktime":917877,
|
||||
"version":4,
|
||||
"vin":[
|
||||
{
|
||||
"txid":"f9ee25c012d769cd84bc76e7e7675ce5917e4bf10f1a210d29c4dc149f87b856",
|
||||
"vout":0,
|
||||
"sequence":4294967294,
|
||||
"n":0,
|
||||
"scriptSig":{
|
||||
"hex":"4730440220144962d60a9aa0ebcf588bd2e6e2318688638ebcd304ab6f8e1d885a8519584102204f7f79bc5a20d19e5cc8cb30d4a540abe6a4c5899687f8165ea4f2aecf37dfae01210249172fff41eb94f01fb91c40aa833a8f448dcb1e04a9ca4eda609448cd62f6a8",
|
||||
"asm":"30440220144962d60a9aa0ebcf588bd2e6e2318688638ebcd304ab6f8e1d885a8519584102204f7f79bc5a20d19e5cc8cb30d4a540abe6a4c5899687f8165ea4f2aecf37dfae[ALL] 0249172fff41eb94f01fb91c40aa833a8f448dcb1e04a9ca4eda609448cd62f6a8"
|
||||
},
|
||||
"addr":"s1ikGwxJc6MTs3nWWc7ZTMMGLJtZwJwZedH",
|
||||
"valueZat":2460792113,
|
||||
"value":24.60792113,
|
||||
"doubleSpentTxID":null
|
||||
}
|
||||
],
|
||||
"vout":[
|
||||
{
|
||||
"value":"1.03192019",
|
||||
"n":0,
|
||||
"scriptPubKey":{
|
||||
"hex":"76a9141b94f6e3fc8601a3d9c059548e880c50738603db88ac",
|
||||
"asm":"OP_DUP OP_HASH160 1b94f6e3fc8601a3d9c059548e880c50738603db OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses":[
|
||||
"s1Piav7BuN4kn2AnTb4SdzkHQsw8UHQiu7n"
|
||||
],
|
||||
"type":"pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value":"23.57599849",
|
||||
"n":1,
|
||||
"scriptPubKey":{
|
||||
"hex":"76a914f1af4ea3681f7d71cb7eaf55d899b9b78b1e095f88ac",
|
||||
"asm":"OP_DUP OP_HASH160 f1af4ea3681f7d71cb7eaf55d899b9b78b1e095f OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses":[
|
||||
"s1jEf5VB8hseLWbw5HUUuSZnzYGQQBKi3nb"
|
||||
],
|
||||
"type":"pubkeyhash"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
32
tests/rpc/testdata/trezarcoin.json
vendored
32
tests/rpc/testdata/trezarcoin.json
vendored
@ -1,32 +0,0 @@
|
||||
{
|
||||
"blockHash": "9c22576a9defad9cc5cf27ed479c2175d4eb396d1b7706bfd5066add9b0366d1",
|
||||
"blockHeight": 1303796,
|
||||
"blockTime": 1584710909,
|
||||
"blockTxs": [
|
||||
"c35f4d078ec352096c1f83908f87e4fbb9553f264b0ba139cd7ca82dc060105a"
|
||||
],
|
||||
"txDetails": {
|
||||
"c35f4d078ec352096c1f83908f87e4fbb9553f264b0ba139cd7ca82dc060105a": {
|
||||
"txid": "c35f4d078ec352096c1f83908f87e4fbb9553f264b0ba139cd7ca82dc060105a",
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "03f4e41304c9c4745e08810078cef13400007a657267706f6f6c2e636f6d00",
|
||||
"sequence": 0
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 100.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "21036842117fa1b85649c3e2e84c759387d5670051213c61764e2a5bbf55260c2f3bac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "01000000fdc4745e010000000000000000000000000000000000000000000000000000000000000000ffffffff1f03f4e41304c9c4745e08810078cef13400007a657267706f6f6c2e636f6d00000000000100e1f505000000002321036842117fa1b85649c3e2e84c759387d5670051213c61764e2a5bbf55260c2f3bac00000000",
|
||||
"time": 1584710909,
|
||||
"blocktime": 1584710909
|
||||
}
|
||||
}
|
||||
}
|
||||
37
tests/rpc/testdata/unobtanium.json
vendored
37
tests/rpc/testdata/unobtanium.json
vendored
@ -1,37 +0,0 @@
|
||||
{
|
||||
"blockHeight": 792323,
|
||||
"blockHash": "b06166e7ec4da9759838415fe8d24a52d069e58731f1b926fce694f8a0b87229",
|
||||
"blockTime": 1465970243,
|
||||
"blockTxs": [
|
||||
"1e79423a628b5ea3a73b6d516c0e6b0e238e2597d6ca0532b98625ef01cb7a12"
|
||||
],
|
||||
"txDetails": {
|
||||
"1e79423a628b5ea3a73b6d516c0e6b0e238e2597d6ca0532b98625ef01cb7a12": {
|
||||
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0d0303170c0101062f503253482fffffffff01c2eb0b00000000001976a91430c95cc63c3e1c651b7153b152fe0c598f1ad25e88ac00000000",
|
||||
"txid": "1e79423a628b5ea3a73b6d516c0e6b0e238e2597d6ca0532b98625ef01cb7a12",
|
||||
"blocktime": 1465970243,
|
||||
"time": 1465970243,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "0303170c0101062f503253482f",
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.0078125,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91430c95cc63c3e1c651b7153b152fe0c598f1ad25e88ac",
|
||||
"addresses": [
|
||||
"uPPNfEHW2D8gVm4GXNbVWTWCj7fQYk62Ah"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
99
tests/rpc/testdata/vertcoin.json
vendored
99
tests/rpc/testdata/vertcoin.json
vendored
@ -1,99 +0,0 @@
|
||||
{
|
||||
"blockHeight": 952235,
|
||||
"blockHash": "b2787dd022e3aa65b63dbf08af2c9bb4d4a362d95e3328c02743a5c8d75acb36",
|
||||
"blockTime": 1529932850,
|
||||
"blockTxs": [
|
||||
"366eca05fa8579465d8822ad6462762120b26239201a34981e5f9d9efac3cc31",
|
||||
"e74c247a5a77d4edd96a5dbb2930c74d9ab550affde991731f78f3e3a2f4b559",
|
||||
"84f9d1fb25882a8eacad3ba83ff6819531c1c489b176273e76d1e53ecf72e207",
|
||||
"65a7e80d2f9b21d0003bac50dc529ceab842fb89208e7bf2b7fc20313ee6c999"
|
||||
],
|
||||
"txDetails": {
|
||||
"e74c247a5a77d4edd96a5dbb2930c74d9ab550affde991731f78f3e3a2f4b559": {
|
||||
"hex": "0200000001241682f3f9b341163babb2e6a41b43699f9dee63687389c55965d1bd0404c78e000000006b483045022100f0bf400ae5245d99f168d0c0da054660fb22615c94c8ee00c1eebef86b32befc022027ceb32aa210563d2600d6a33f32158e17b5d64eed9829c67dd967d86108db9901210259921142e1b9e7b28e7cbb0449ca5753deeea3fb7f6be470292565cf1ef86d74feffffff024b43f500000000001976a914a58a32fdf2286f90c7a4e9e1c92eb57c4936bacf88ac7e619b00000000001976a914108f72087bfc3131c7c09feba913bf66b652f5c188aca8870e00",
|
||||
"txid": "e74c247a5a77d4edd96a5dbb2930c74d9ab550affde991731f78f3e3a2f4b559",
|
||||
"blocktime": 1529932850,
|
||||
"time": 1529932850,
|
||||
"locktime": 952232,
|
||||
"vsize": 226,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "8ec70404bdd16559c589736863ee9d9f69431ba4e6b2ab3b1641b3f9f3821624",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100f0bf400ae5245d99f168d0c0da054660fb22615c94c8ee00c1eebef86b32befc022027ceb32aa210563d2600d6a33f32158e17b5d64eed9829c67dd967d86108db9901210259921142e1b9e7b28e7cbb0449ca5753deeea3fb7f6be470292565cf1ef86d74"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.16073547,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a58a32fdf2286f90c7a4e9e1c92eb57c4936bacf88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.10183038,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914108f72087bfc3131c7c09feba913bf66b652f5c188ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"65a7e80d2f9b21d0003bac50dc529ceab842fb89208e7bf2b7fc20313ee6c999": {
|
||||
"hex": "0100000003748dcb015356e8d6281ecec18c308a8198e20555c9b254a1addd2cd67ddb6557000000006b4830450221009bf690117c8624bc97849c49ebc37e02664545761d1d975a4a6636e462a75ecf02206b67bfd773a84a7a6f04905d7b358ee96f0f436674c49f6968b19654390f5763012103ec0f6a189b51640672d67f3b41a06c9b6b01e5c65c4ef56dda7581d1ca6ad2ebffffffff70361357af324b196f1ad09297d1a33a7b42f6a0cf0c54526a712be12364cb9c010000006a473044022007170c7944cee3facff0949fadfb85739dcca9e9dc9cde9cdf86b166169b6d75022072d329810a84d3a997630e742f638bade7734d0f6e2c45cc4c2c6a0797c3bb1f0121024783018d0b2d63a455bb9d71997b458c9dc6138dc38d32ce1cb5dce69699e3d9ffffffff0eb97971739b2d8a359a48bf2099c25976d876ed0b727f00315aa04a6faf500d000000006a4730440220201f8bccbae07bc065faa5c2602b80ed3b54b5d62c59f769bd70ccca34ba343e022013b70d43fcdb673d089265348548c107a1e25acdafeb7dc54ea3d367a7b8ab16012103286074c7bde46a2d5caa130669fe45146b8a3100bcd6f4cd1c80ae7d68e67babffffffff026cbae898020000001976a91413ef0a6e4c098b740aa38d13f5e12a8f9790769888ac04815402000000001976a9140f1800503d3cfe374df1200b3387bcbb43a874e688aca9870e00",
|
||||
"txid": "65a7e80d2f9b21d0003bac50dc529ceab842fb89208e7bf2b7fc20313ee6c999",
|
||||
"blocktime": 1529932850,
|
||||
"time": 1529932850,
|
||||
"locktime": 952233,
|
||||
"vsize": 520,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "5765db7dd62cddada154b2c95505e298818a308cc1ce1e28d6e8565301cb8d74",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009bf690117c8624bc97849c49ebc37e02664545761d1d975a4a6636e462a75ecf02206b67bfd773a84a7a6f04905d7b358ee96f0f436674c49f6968b19654390f5763012103ec0f6a189b51640672d67f3b41a06c9b6b01e5c65c4ef56dda7581d1ca6ad2eb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "9ccb6423e12b716a52540ccfa0f6427b3aa3d19792d01a6f194b32af57133670",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "473044022007170c7944cee3facff0949fadfb85739dcca9e9dc9cde9cdf86b166169b6d75022072d329810a84d3a997630e742f638bade7734d0f6e2c45cc4c2c6a0797c3bb1f0121024783018d0b2d63a455bb9d71997b458c9dc6138dc38d32ce1cb5dce69699e3d9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "0d50af6f4aa05a31007f720bed76d87659c29920bf489a358a2d9b737179b90e",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220201f8bccbae07bc065faa5c2602b80ed3b54b5d62c59f769bd70ccca34ba343e022013b70d43fcdb673d089265348548c107a1e25acdafeb7dc54ea3d367a7b8ab16012103286074c7bde46a2d5caa130669fe45146b8a3100bcd6f4cd1c80ae7d68e67bab"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 111.553235,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91413ef0a6e4c098b740aa38d13f5e12a8f9790769888ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.39092484,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9140f1800503d3cfe374df1200b3387bcbb43a874e688ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
36
tests/rpc/testdata/viacoin.json
vendored
36
tests/rpc/testdata/viacoin.json
vendored
@ -1,36 +0,0 @@
|
||||
{
|
||||
"blockHeight": 6197648,
|
||||
"blockHash": "7bfaf2048ce581f05ea6c87cb043bb5908e6afa83ef49621bf558a027cfe367e",
|
||||
"blockTime": 1555275169,
|
||||
"blockTxs": [
|
||||
"79f2c2690cae8e3e4631a30462197316228fe0e5cf4f2f2eee904d8dcd0206c6"
|
||||
],
|
||||
"txDetails": {
|
||||
"79f2c2690cae8e3e4631a30462197316228fe0e5cf4f2f2eee904d8dcd0206c6": {
|
||||
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff090390915e045cb39da1ffffffff01ca9a3b00000000001976a91424cc424c1e5e977175d2b20012554d39024bd68f88ac00000000",
|
||||
"txid": "79f2c2690cae8e3e4631a30462197316228fe0e5cf4f2f2eee904d8dcd0206c6",
|
||||
"blocktime": 1555275169,
|
||||
"time": 1555275169,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"coinbase": "0390915e045cb39da1",
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.0390625,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91424cc424c1e5e977175d2b20012554d39024bd68f88ac",
|
||||
"addresses": [
|
||||
"VdMPvn7vUTSzbYjiMDs1jku9wAh1Ri2Y1A"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
53
tests/rpc/testdata/vipstarcoin.json
vendored
53
tests/rpc/testdata/vipstarcoin.json
vendored
@ -1,53 +0,0 @@
|
||||
{
|
||||
"blockHeight": 537194,
|
||||
"blockHash": "2ec778923888428f75e89c28625e22ebb11ce71b16b909314c661a646fa98bfc",
|
||||
"blockTime": 1555853392,
|
||||
"blockTxs": [
|
||||
"43087ee6460ab870f42712ed95d047b52d460227e2d2d62f70f70d290a1ee813",
|
||||
"a7de2ccebee8c090bf286177842944a0db0e2733b084fa56572dda0c2d4e3216",
|
||||
"d7ef9e537f6eb6d02f99f3eee65a8b4f75b5c5c5906247dff386e625b1aabef3"
|
||||
],
|
||||
"txDetails": {
|
||||
"a7de2ccebee8c090bf286177842944a0db0e2733b084fa56572dda0c2d4e3216": {
|
||||
"hex": "02000000018226c05828e931e6e24a48cc7615c6aa8964b17ffaa6acb6ef34987eba136e0a0200000049483045022100ca50e41692a9b83622a5ce9e8626f2c7a529c9a32bfb2aea8bd038ad36124bce022034381e1394e536f5c24ce4576dc86eee1c3239baadbe0e41365b1f2eee4f277601ffffffff030000000000000000000013f506556e0000232102474875b1a3bb3f974ce93bcaccc639a1e12072e128ed389107894d9aa9babe39ac60b60507556e0000232102474875b1a3bb3f974ce93bcaccc639a1e12072e128ed389107894d9aa9babe39ac00000000",
|
||||
"txid": "a7de2ccebee8c090bf286177842944a0db0e2733b084fa56572dda0c2d4e3216",
|
||||
"blocktime": 1555853392,
|
||||
"time": 1555853392,
|
||||
"locktime": 0,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "0a6e13ba7e9834efb6aca6fa7fb16489aac61576cc484ae2e631e92858c02682",
|
||||
"vout": 2,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100ca50e41692a9b83622a5ce9e8626f2c7a529c9a32bfb2aea8bd038ad36124bce022034381e1394e536f5c24ce4576dc86eee1c3239baadbe0e41365b1f2eee4f277601"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1213114.68000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "2102474875b1a3bb3f974ce93bcaccc639a1e12072e128ed389107894d9aa9babe39ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1213114.69090400,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "2102474875b1a3bb3f974ce93bcaccc639a1e12072e128ed389107894d9aa9babe39ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
133
tests/rpc/testdata/zcash.json
vendored
133
tests/rpc/testdata/zcash.json
vendored
@ -1,133 +0,0 @@
|
||||
{
|
||||
"blockHeight": 349410,
|
||||
"blockHash": "000000000101b45343aeda139d06d7f188393a5cf4adabfa191cb1828d67f6bd",
|
||||
"blockTime": 1530264033,
|
||||
"blockTxs": [
|
||||
"6ebf0114454ba776f878cf726be3cb65964b21fad8dfca5d2ee69bd4a32cfa97",
|
||||
"3de894528d5f8dbe14f726244be70a88f9b738020215c91b2893fa5a46f48c14",
|
||||
"80d496a614f65e0933a5eb1107ff322d6c03fca8f1d3bfab2f6522291c8de612",
|
||||
"262f2bd9b79f569ffebef1cb0f9326fb07d389543605d311dc47740b730132c8",
|
||||
"c84493f0ab4335447aeb94fe80b6c48675e4a2320dbf4b6f8cb71352ca25e645",
|
||||
"7ee2c521ec90956da6f923501486305e3280729cf251a4ba30ecbd9a227297b0",
|
||||
"5baabe317a29bee55738a3b52eab7059e4594cd0ca19c74be11f91c764592c5f",
|
||||
"b9bff7782e83daa72750c5dd7ac73b8d274ead198804f4867ee28d8381ef3a07",
|
||||
"753666801b1c8513feaa447e8afa92a329e4dfd93291124fd31cf17e235b41c3",
|
||||
"896f962ef7a942362760aae0c7f9e951da7961398cf8bafa6ef4bec7821b4225",
|
||||
"a162ce37f2469e8e624175d1cbc2105badb56f10c114c1339b3528e9701b6925",
|
||||
"d97b85f5e9c1e1ac184609d1d7336902ca1272228400ce8ed82ecc0ec35bab75"
|
||||
],
|
||||
"txDetails": {
|
||||
"80d496a614f65e0933a5eb1107ff322d6c03fca8f1d3bfab2f6522291c8de612": {
|
||||
"hex": "030000807082c403010cb33c71311a437b999c7ed0adbae487cbbf73297f7283e6b0a10f9bc2aa9f9c000000006a473044022037d365e3e200a5b75738baddb95262bede1786741bf013278652912153e594d802202cc9befcaadf78318317b0741f145f736af29dae6fc71c53cbfb63b5edadc572012103a294809dd3460af72a2157247e9bf5b958db7a6cda52c447673c85ed5b4be04afeffffff027ecdc609000000001976a914afa0f9a6a73874495cb8a7657c056d19a4d9a28088ace3d46b29010000001976a9146126ed5dadfa31ed09fe661d25a11f4e903cf60a88acd7540500f654050000",
|
||||
"txid": "80d496a614f65e0933a5eb1107ff322d6c03fca8f1d3bfab2f6522291c8de612",
|
||||
"blocktime": 1530264033,
|
||||
"time": 1530264033,
|
||||
"locktime": 349399,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "9c9faac29b0fa1b0e683727f2973bfcb87e4baadd07e9c997b431a31713cb30c",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "473044022037d365e3e200a5b75738baddb95262bede1786741bf013278652912153e594d802202cc9befcaadf78318317b0741f145f736af29dae6fc71c53cbfb63b5edadc572012103a294809dd3460af72a2157247e9bf5b958db7a6cda52c447673c85ed5b4be04a"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1.64023678,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914afa0f9a6a73874495cb8a7657c056d19a4d9a28088ac",
|
||||
"addresses": ["t1ZtF6fAXmgtaAAnWKCoRC2fGjfShrsp1mh"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 49.89900003,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9146126ed5dadfa31ed09fe661d25a11f4e903cf60a88ac",
|
||||
"addresses": ["t1SjJBeqRukybZMJoGvzr6estEKQMsnQVEi"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"7ee2c521ec90956da6f923501486305e3280729cf251a4ba30ecbd9a227297b0": {
|
||||
"hex": "030000807082c40307d03d57f8ad50e801bb23c197b7ae6722393fc12ef6b30fcaa77db5d5e9c84044010000006a473044022005cfef2a84a0490a19b6215c763808343ee1a297e0a2656362cfbdd0742d80540220166fa467e7ecf0c01db946e80dcffc640d204e661bfe892596aab5ba5c18e2fd01210304668b7d8f195822a56898b7dc331dd0a3077b94901ab4111490111903747b70feffffff328fe35fc6dd4d0a445280d862dc696f2e32b7baf8c57b8c6061f62ac259cd44000000006a47304402203e9715d825367f1e6f0af698403f2e20c38215a23a7cfefa2863f96005bb907d02201646b4860583ec77fe21e4f2895c61d111a817ac4cc7aa18343a318965f908100121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fbfeffffffb63e699adf7c0266c09b9fda92c0ea7ecdbc9c27eeed8dbe2e7660d42eb639cee60000006b483045022100a53cf85cff3dd727a176dbd70ffeb3e8b1301f116d7b284322f0b0b18ecaf94b02201292af8f1493521ade1d85caa05f2d832a0fb8f05ce286515a2ef9ea76206df50121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fbfeffffff1ad92df693bafa078b9d546f39ba0089f8a5fe1ded563165573227b65f509c37390000006a47304402204607c6ebd7dca117de8e1224f6c1395684c4b7160584aac27fa64feb2ec034be022023995fd5fa02c802e3ee1b9c1dd1b1f4fbf4095554e8ae044225d63c01fd2a5e0121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fbfeffffffd01557bf011f28e8c052645ad55a5d75f705a0ca0373ad3421c7d6d6375fd500010000006a47304402205e784f982ca17aceb517a411be3e83cf341137443f68fe0c3d0da174707ad41e02207ff2a726ac1dfea75562ef1158e154bf6bb2aa15c6049b41a30c5fc39f76757a0121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fbfeffffff95c1be816da9fc22e49bf8125581406b7713d230620bb0c2aaf5db14902f5f36900000006b483045022100cc5a0fa9744e733db784bfa886fe4f357685dc2808724f711a1c7c0cd6450e82022021ef44520216108c6edd6965ce4696d67001a32b8e8c75d8f5e44aa2ae84b68b0121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fbfeffffff4a60add86269a52fd71ebbb94b18565e25bb4715176695fee7f2e61b0b1a7dce000000006a47304402204ab729c42d2b405fe87dfc84a581b468636012a5db8b8307b7553c453edd31d9022047d03441fb530323a73961bad3e1ba215b4e5c631d76482a72764153e17a0e260121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fbfeffffff01b350540c000000001976a914b461a4bb45a24995566f7ea86c6873bc6995b98f88ac000000000000000000",
|
||||
"txid": "7ee2c521ec90956da6f923501486305e3280729cf251a4ba30ecbd9a227297b0",
|
||||
"blocktime": 1530264033,
|
||||
"time": 1530264033,
|
||||
"locktime": 0,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "4440c8e9d5b57da7ca0fb3f62ec13f392267aeb797c123bb01e850adf8573dd0",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "473044022005cfef2a84a0490a19b6215c763808343ee1a297e0a2656362cfbdd0742d80540220166fa467e7ecf0c01db946e80dcffc640d204e661bfe892596aab5ba5c18e2fd01210304668b7d8f195822a56898b7dc331dd0a3077b94901ab4111490111903747b70"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "44cd59c22af661608c7bc5f8bab7322e6f69dc62d88052440a4dddc65fe38f32",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402203e9715d825367f1e6f0af698403f2e20c38215a23a7cfefa2863f96005bb907d02201646b4860583ec77fe21e4f2895c61d111a817ac4cc7aa18343a318965f908100121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "ce39b62ed460762ebe8dedee279cbccd7eeac092da9f9bc066027cdf9a693eb6",
|
||||
"vout": 230,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100a53cf85cff3dd727a176dbd70ffeb3e8b1301f116d7b284322f0b0b18ecaf94b02201292af8f1493521ade1d85caa05f2d832a0fb8f05ce286515a2ef9ea76206df50121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "379c505fb6273257653156ed1dfea5f88900ba396f549d8b07faba93f62dd91a",
|
||||
"vout": 57,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402204607c6ebd7dca117de8e1224f6c1395684c4b7160584aac27fa64feb2ec034be022023995fd5fa02c802e3ee1b9c1dd1b1f4fbf4095554e8ae044225d63c01fd2a5e0121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "00d55f37d6d6c72134ad7303caa005f7755d5ad55a6452c0e8281f01bf5715d0",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402205e784f982ca17aceb517a411be3e83cf341137443f68fe0c3d0da174707ad41e02207ff2a726ac1dfea75562ef1158e154bf6bb2aa15c6049b41a30c5fc39f76757a0121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "365f2f9014dbf5aac2b00b6230d213776b40815512f89be422fca96d81bec195",
|
||||
"vout": 144,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100cc5a0fa9744e733db784bfa886fe4f357685dc2808724f711a1c7c0cd6450e82022021ef44520216108c6edd6965ce4696d67001a32b8e8c75d8f5e44aa2ae84b68b0121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "ce7d1a0b1be6f2e7fe9566171547bb255e56184bb9bb1ed72fa56962d8ad604a",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402204ab729c42d2b405fe87dfc84a581b468636012a5db8b8307b7553c453edd31d9022047d03441fb530323a73961bad3e1ba215b4e5c631d76482a72764153e17a0e260121037d4a056edd1419bf1efc95f02557b432e81cbfd8877450aef07f22e4370378fb"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 2.06852275,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b461a4bb45a24995566f7ea86c6873bc6995b98f88ac",
|
||||
"addresses": ["t1aKNcFdt396ir1bsdDdjuwQj63JHRvMqP1"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
92
tests/rpc/testdata/zcash_testnet.json
vendored
92
tests/rpc/testdata/zcash_testnet.json
vendored
@ -1,92 +0,0 @@
|
||||
{
|
||||
"blockHeight": 251102,
|
||||
"blockHash": "001335906f981bbf0633e124e2fa8afef3d882e34a0306a4e0c55162e57e673d",
|
||||
"blockTime": 1528781777,
|
||||
"blockTxs": [
|
||||
"f02aa1c4c86e1d0cef6ccbbc48b2b7b38355bc3612d8f77dd58d04be1ec6ba19",
|
||||
"a9f7cc34d7e272d2d9fb68cfa1c1941e338f377e6e426ae2fea1c12616d89c63",
|
||||
"83f3db1d129a77bee9c6cf32cbc12d959cd0af8c8d734c2611db4bfddfe99202"
|
||||
],
|
||||
"txDetails": {
|
||||
"a9f7cc34d7e272d2d9fb68cfa1c1941e338f377e6e426ae2fea1c12616d89c63": {
|
||||
"hex": "030000807082c40301601ade5f535f62f3da01e0c88b16beb916877fa0fa43299a9e2398b813d0a119020000006a4730440220770472192407cfc5c01e331442ac579a68e445a7ccb0fe8a481161519555794a02207b00b4c01af416a4972c2fd2fba8d58a6467da545400469ab57e9207a0ee3ca201210201d494a45f36f545443bafd1a9050b02f448dd236bb4ce2602f83978980b98f2feffffff02ea5e2c1c000000001976a9144ef2de10b304381a9404ccbe12f83395e7860bbd88ac00a3e1110000000017a9146a8eecfe3a7949a4a8c68754accaea75ab32cd9e8794d40300f1d4030000",
|
||||
"txid": "a9f7cc34d7e272d2d9fb68cfa1c1941e338f377e6e426ae2fea1c12616d89c63",
|
||||
"blocktime": 1528781777,
|
||||
"time": 1528781777,
|
||||
"locktime": 251028,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "19a1d013b898239e9a2943faa07f8716b9be168bc8e001daf3625f535fde1a60",
|
||||
"vout": 2,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220770472192407cfc5c01e331442ac579a68e445a7ccb0fe8a481161519555794a02207b00b4c01af416a4972c2fd2fba8d58a6467da545400469ab57e9207a0ee3ca201210201d494a45f36f545443bafd1a9050b02f448dd236bb4ce2602f83978980b98f2"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 4.72669930,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9144ef2de10b304381a9404ccbe12f83395e7860bbd88ac",
|
||||
"addresses": ["tmGunyrqeeHBKX3Jm23zKLokRogrS51Qzqh"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 3.0,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9146a8eecfe3a7949a4a8c68754accaea75ab32cd9e87",
|
||||
"addresses": ["t2GGEpYQUKiTsb9WYKD9AKNEriao84tVsr5"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"83f3db1d129a77bee9c6cf32cbc12d959cd0af8c8d734c2611db4bfddfe99202": {
|
||||
"hex": "030000807082c40302eac0139a677c07b6fcdddd205f4bf538d9cc9fb586565fe77440f93cf1b5ca9a010000006b4830450221009ad50b4f0da90a1876af6b43c029e55f1c8b8c44e94161a7f14c812adcebeaa902204b9df40096337eb43120408d4743693b17ea27fc0f660948a0a761264e67a6b00121036ec451bd1d3d39bb8d2d0264dd5a0ff817ae306ec7ce0c7c9b86be3f3dde8727feffffff6a1ed49e62634ab5a60b23ec73f9014ad1c9d3bd3bf023333c8eb311c802f298000000006b4830450221009008a10ebebf45f1a9aeb01a5b49a5de820a1a396ca1b900ea0420a1c2c49ea7022053fad044ff42792dcad16d084d67d7c4cc565458f78a14292fe5ef5e9f7a20bb012103448301b9253e6822ae05af64c61517fe8cf8b22590cc7d0b308b7f5cbce26db1feffffff0200a3e111000000001976a9149bc587e2cdd13b78e26f601f084ea0597b357f4d88ac3176a002000000001976a91414a88f1032c8ef1c6bd9177f62cdb260b5087b5488acd2d40300f1d4030000",
|
||||
"txid": "83f3db1d129a77bee9c6cf32cbc12d959cd0af8c8d734c2611db4bfddfe99202",
|
||||
"blocktime": 1528781777,
|
||||
"time": 1528781777,
|
||||
"locktime": 251090,
|
||||
"version": 3,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "9acab5f13cf94074e75f5686b59fccd938f54b5f20ddddfcb6077c679a13c0ea",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009ad50b4f0da90a1876af6b43c029e55f1c8b8c44e94161a7f14c812adcebeaa902204b9df40096337eb43120408d4743693b17ea27fc0f660948a0a761264e67a6b00121036ec451bd1d3d39bb8d2d0264dd5a0ff817ae306ec7ce0c7c9b86be3f3dde8727"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "98f202c811b38e3c3323f03bbdd3c9d14a01f973ec230ba6b54a63629ed41e6a",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009008a10ebebf45f1a9aeb01a5b49a5de820a1a396ca1b900ea0420a1c2c49ea7022053fad044ff42792dcad16d084d67d7c4cc565458f78a14292fe5ef5e9f7a20bb012103448301b9253e6822ae05af64c61517fe8cf8b22590cc7d0b308b7f5cbce26db1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 3.0,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9149bc587e2cdd13b78e26f601f084ea0597b357f4d88ac",
|
||||
"addresses": ["tmPuzhaxL3vzTqkyJ6wn48Q4ZfAo6PBvHKC"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.44070449,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91414a88f1032c8ef1c6bd9177f62cdb260b5087b5488ac",
|
||||
"addresses": ["tmBbamgVqVBTAsEzPmEymbczdoaQvE5qwaR"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
189
tests/rpc/testdata/zelcash.json
vendored
189
tests/rpc/testdata/zelcash.json
vendored
@ -1,189 +0,0 @@
|
||||
{
|
||||
"blockHeight": 331897,
|
||||
"blockHash": "000000241b30db061faa43420fdcc9e85a8c29c2f331c523523b32ce8529e6b6",
|
||||
"blockTime": 1557270310,
|
||||
"blockTxs": [
|
||||
"21a06cd256d3f7e754f174721c1f44aac5cd3cdbbdc23087d2efec1a33288d20",
|
||||
"e44bc8dc1b96af8e3c2d13211fa8c18de1644888445890bb61d618b055833c14",
|
||||
"625c91358d9add9cbdaf2e8df9633e31d6dec0095121e4483b7d783fb0d8d828",
|
||||
"d33ad66ecc5bdb9ad5430412f7c5b5e71eb266d4accb83d6b5209a30e0886360",
|
||||
"d8e714f869542d9c183e971341933443abfb70f72883f3419fdb76563126329c",
|
||||
"01af9a84d83e9676d235c4f1cf54040e67438c8e0a2b9a066a963d8bf32f69b2",
|
||||
"23f82502fd9a8f8d29248607cf5025c5190b03dbfc594aca907fe11198ff1599",
|
||||
"6b06458bfd6c1356c56ee87dc3956b947c75788b8944d028efb83be19dfe49b7",
|
||||
"2af1c680c223b76d457a16c4fb05da2c83c3579802a8528ed3ed498e985a44f6",
|
||||
"8b6a1054b148dc4beb5237002b627219d06dddfa4b4bebea5adfe15f20b48559",
|
||||
"0b5b3a7ce7761877494a3f4b2b307d1a96648bf23239fa66dab7f4fbe068ebc2",
|
||||
"8d669c48e4a513c94c9684fb8b6ec4c83e1e8bd24b42b4654e1c77726a028fed"
|
||||
],
|
||||
"txDetails": {
|
||||
"625c91358d9add9cbdaf2e8df9633e31d6dec0095121e4483b7d783fb0d8d828": {
|
||||
"hex": "0400008085202f89055d311a6096bd3bde1384373427e42b6b77c67e7895e071f15e00287157ff53f3000000006a473044022025fbea8e0eb05fe70b4501b441f3f50f259f109ea3a77bbc153e99aca9675a440220220a0a7dcb966a390c4a0a4f6fc1a0c7e59e2aad9a35f8cb0bf9de2b5248b991012102a0e47d64b0381c54abc5c535267a873bfba496a11346d1e4556749ba66a7b10ffeffffff8a0105244aebdaac02b8b26c26eb56c84661f03f6f0f2fb5656476b14f4aee5c000000006a4730440220183302d02c48dd325b0d41e4de6b2db203f1266ed3c2d6455a2e1e1201ade326022014528b7f948c0413890ee643dc13c5d112a81726a279d2049f482e9c0c47f307012103e32ac7699f228dfc6bd02b08ce5fe1869032f69dd78febfa396c3aad4a8b1f83feffffff8cc971fc0fab8348a8827bee546494dc6a5e749aa83f8811fc8c1297c9dbf1f2660000006a47304402205ca3ef28b263aa353c0451b2a3caaecf5a57aa6484f6ee07c7ccb82f79a3254902205b46464b11fbba5be703e32d52c02b2b124d0f98cc1d9387722d5472eefe014401210254d683cf6818c2c99882a24b546d6eb63d76f13413cb0a30ee5be0484fadd2d8feffffff24deb18b787528e3978d3b39f7b3886e6e89416146d7f42c72ce0c3d97f05c75000000006b483045022100b14ef898e3bf63ddce85e5ebde4eaa44d3f050d8994d24b8aff4a128cdd7d5a3022035a449d3ac32b98fdbd7c8ae0d2718b4039289e68543700f1dafd1aa91798f6f012102a10e9edbed2a96babea70b32e4f3197abaf21308a0809ffc344c0cc5a408aceffeffffffba73225c4b9f1368671825dc00e1fbc1b8c10172bcac5150e7ea2e01c628eb3d000000006a473044022074e2032663b19902d84c1ed16c452b8abda3fb07fa94283f5ab648e7f23bb9f1022017bbf83a921ffce04d3e5ccf365e08a447a2872c08d60bf2276df802efbce1f201210392dce1050001ea1f2a9a2d824c06fdc70c0e3bf2424ff45acd0512fc3f91e526feffffff02c045436a740000001976a91441283444bab7ea0a9fdd3e3890a927896cd3feb988accf430f00000000001976a914550597ca228081b4b3fb94cbbe534184fee9335288ac6e1005008d1005000000000000000000000000",
|
||||
"txid": "625c91358d9add9cbdaf2e8df9633e31d6dec0095121e4483b7d783fb0d8d828",
|
||||
"blocktime": 1557270310,
|
||||
"time": 1557270310,
|
||||
"locktime": 331886,
|
||||
"version": 4,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "f353ff577128005ef171e095787ec6776b2be42734378413de3bbd96601a315d",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"n": 0,
|
||||
"scriptSig": {
|
||||
"hex": "473044022025fbea8e0eb05fe70b4501b441f3f50f259f109ea3a77bbc153e99aca9675a440220220a0a7dcb966a390c4a0a4f6fc1a0c7e59e2aad9a35f8cb0bf9de2b5248b991012102a0e47d64b0381c54abc5c535267a873bfba496a11346d1e4556749ba66a7b10f",
|
||||
"asm": "3044022025fbea8e0eb05fe70b4501b441f3f50f259f109ea3a77bbc153e99aca9675a440220220a0a7dcb966a390c4a0a4f6fc1a0c7e59e2aad9a35f8cb0bf9de2b5248b991[ALL] 02a0e47d64b0381c54abc5c535267a873bfba496a11346d1e4556749ba66a7b10f"
|
||||
},
|
||||
"addr": "t1a6kYQgo1syNbwPNbCm2EAhVqz6JFD5FzN",
|
||||
"valueSat": 305000000000,
|
||||
"value": 3050,
|
||||
"doubleSpentTxID": null
|
||||
},
|
||||
{
|
||||
"txid": "5cee4a4fb1766465b52f0f6f3ff06146c856eb266cb2b802acdaeb4a2405018a",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"n": 1,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220183302d02c48dd325b0d41e4de6b2db203f1266ed3c2d6455a2e1e1201ade326022014528b7f948c0413890ee643dc13c5d112a81726a279d2049f482e9c0c47f307012103e32ac7699f228dfc6bd02b08ce5fe1869032f69dd78febfa396c3aad4a8b1f83",
|
||||
"asm": "30440220183302d02c48dd325b0d41e4de6b2db203f1266ed3c2d6455a2e1e1201ade326022014528b7f948c0413890ee643dc13c5d112a81726a279d2049f482e9c0c47f307[ALL] 03e32ac7699f228dfc6bd02b08ce5fe1869032f69dd78febfa396c3aad4a8b1f83"
|
||||
},
|
||||
"addr": "t1KAwQCWUngaEY63esqpL5ptQ5JkfRhFR9R",
|
||||
"valueSat": 22162500000,
|
||||
"value": 221.625,
|
||||
"doubleSpentTxID": null
|
||||
},
|
||||
{
|
||||
"txid": "f2f1dbc997128cfc11883fa89a745e6adc946454ee7b82a84883ab0ffc71c98c",
|
||||
"vout": 102,
|
||||
"sequence": 4294967294,
|
||||
"n": 2,
|
||||
"scriptSig": {
|
||||
"hex": "47304402205ca3ef28b263aa353c0451b2a3caaecf5a57aa6484f6ee07c7ccb82f79a3254902205b46464b11fbba5be703e32d52c02b2b124d0f98cc1d9387722d5472eefe014401210254d683cf6818c2c99882a24b546d6eb63d76f13413cb0a30ee5be0484fadd2d8",
|
||||
"asm": "304402205ca3ef28b263aa353c0451b2a3caaecf5a57aa6484f6ee07c7ccb82f79a3254902205b46464b11fbba5be703e32d52c02b2b124d0f98cc1d9387722d5472eefe0144[ALL] 0254d683cf6818c2c99882a24b546d6eb63d76f13413cb0a30ee5be0484fadd2d8"
|
||||
},
|
||||
"addr": "t1VoyaSqyh8CxHWQ7CupAY51G2HnKf7EVTw",
|
||||
"valueSat": 1059791034,
|
||||
"value": 10.59791034,
|
||||
"doubleSpentTxID": null
|
||||
},
|
||||
{
|
||||
"txid": "755cf0973d0cce722cf4d7466141896e6e88b3f7393b8d97e32875788bb1de24",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"n": 3,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b14ef898e3bf63ddce85e5ebde4eaa44d3f050d8994d24b8aff4a128cdd7d5a3022035a449d3ac32b98fdbd7c8ae0d2718b4039289e68543700f1dafd1aa91798f6f012102a10e9edbed2a96babea70b32e4f3197abaf21308a0809ffc344c0cc5a408acef",
|
||||
"asm": "3045022100b14ef898e3bf63ddce85e5ebde4eaa44d3f050d8994d24b8aff4a128cdd7d5a3022035a449d3ac32b98fdbd7c8ae0d2718b4039289e68543700f1dafd1aa91798f6f[ALL] 02a10e9edbed2a96babea70b32e4f3197abaf21308a0809ffc344c0cc5a408acef"
|
||||
},
|
||||
"addr": "t1P92twuXiU6ryBa1eRKCaKUU6sfAwwhECt",
|
||||
"valueSat": 157715260493,
|
||||
"value": 1577.15260493,
|
||||
"doubleSpentTxID": null
|
||||
},
|
||||
{
|
||||
"txid": "3deb28c6012eeae75051acbc7201c1b8c1fbe100dc25186768139f4b5c2273ba",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"n": 4,
|
||||
"scriptSig": {
|
||||
"hex": "473044022074e2032663b19902d84c1ed16c452b8abda3fb07fa94283f5ab648e7f23bb9f1022017bbf83a921ffce04d3e5ccf365e08a447a2872c08d60bf2276df802efbce1f201210392dce1050001ea1f2a9a2d824c06fdc70c0e3bf2424ff45acd0512fc3f91e526",
|
||||
"asm": "3044022074e2032663b19902d84c1ed16c452b8abda3fb07fa94283f5ab648e7f23bb9f1022017bbf83a921ffce04d3e5ccf365e08a447a2872c08d60bf2276df802efbce1f2[ALL] 0392dce1050001ea1f2a9a2d824c06fdc70c0e3bf2424ff45acd0512fc3f91e526"
|
||||
},
|
||||
"addr": "t1Vc2NKkijULG8LCRjCyDCT8Ryc7v6zCY1X",
|
||||
"valueSat": 14062450000,
|
||||
"value": 140.6245,
|
||||
"doubleSpentTxID": null
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": "4999.99000000",
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91441283444bab7ea0a9fdd3e3890a927896cd3feb988ac",
|
||||
"asm": "OP_DUP OP_HASH160 41283444bab7ea0a9fdd3e3890a927896cd3feb9 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses": [
|
||||
"t1Pp86EqzX3WgojH8jeNfQm28TcsKwkHghe"
|
||||
],
|
||||
"type": "pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": "0.01000399",
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914550597ca228081b4b3fb94cbbe534184fee9335288ac",
|
||||
"asm": "OP_DUP OP_HASH160 550597ca228081b4b3fb94cbbe534184fee93352 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses": [
|
||||
"t1RdA9F99sXJttasG8VxKXNh2WxgLN963Hu"
|
||||
],
|
||||
"type": "pubkeyhash"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"01af9a84d83e9676d235c4f1cf54040e67438c8e0a2b9a066a963d8bf32f69b2": {
|
||||
"hex": "0400008085202f8901c8c4858e2bb7d1243a03ad21fb84422d7678d9aec0d33a2318f3c84046443993000000006a473044022060b8a51b6deba492a7ea5beb26f9cb06c0bdecd6f678700e0ef7bcbe30fc66c70220684f2f1299926fe96bdefb0388bad63b5473265f1ee684dab66e8549fae3e63d012103fa2199f5eecadffc0f5069f5fd041217d85eb5889ffde4636f3b8974b473abc7feffffff03baf48380040000001976a91478a3a632d414b2eb129ae4edc6ced6cf862387ac88ac4e5f2251000000001976a9146a71e4371a442270dfd4b29de8a981e6cb4ad4d988acb18b746b000000001976a914a568940c7c4c961d1ff6fdf7d7f97aeb5db2cbfc88ac6e1005008d1005000000000000000000000000",
|
||||
"txid": "01af9a84d83e9676d235c4f1cf54040e67438c8e0a2b9a066a963d8bf32f69b2",
|
||||
"blocktime": 1557270310,
|
||||
"time": 1557270310,
|
||||
"locktime": 331886,
|
||||
"version": 4,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "9339444640c8f318233ad3c0aed978762d4284fb21ad033a24d1b72b8e85c4c8",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"n": 0,
|
||||
"scriptSig": {
|
||||
"hex": "473044022060b8a51b6deba492a7ea5beb26f9cb06c0bdecd6f678700e0ef7bcbe30fc66c70220684f2f1299926fe96bdefb0388bad63b5473265f1ee684dab66e8549fae3e63d012103fa2199f5eecadffc0f5069f5fd041217d85eb5889ffde4636f3b8974b473abc7",
|
||||
"asm": "3044022060b8a51b6deba492a7ea5beb26f9cb06c0bdecd6f678700e0ef7bcbe30fc66c70220684f2f1299926fe96bdefb0388bad63b5473265f1ee684dab66e8549fae3e63d[ALL] 03fa2199f5eecadffc0f5069f5fd041217d85eb5889ffde4636f3b8974b473abc7"
|
||||
},
|
||||
"addr": "t1gdnENdKNKFDvXijGUG7xdnGyj4To8LCpR",
|
||||
"valueSat": 22500008143,
|
||||
"value": 225.00008143,
|
||||
"doubleSpentTxID": null
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": "193.36000698",
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91478a3a632d414b2eb129ae4edc6ced6cf862387ac88ac",
|
||||
"asm": "OP_DUP OP_HASH160 78a3a632d414b2eb129ae4edc6ced6cf862387ac OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses": [
|
||||
"t1UsV8uGDgP3jAJtYRwhYbgj2jLZYgjASS8"
|
||||
],
|
||||
"type": "pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": "13.61207118",
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9146a71e4371a442270dfd4b29de8a981e6cb4ad4d988ac",
|
||||
"asm": "OP_DUP OP_HASH160 6a71e4371a442270dfd4b29de8a981e6cb4ad4d9 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses": [
|
||||
"t1TaS4zDnaVbL2kbmYtbqXwTn2jiuEDTJr9"
|
||||
],
|
||||
"type": "pubkeyhash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": "18.02800049",
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a568940c7c4c961d1ff6fdf7d7f97aeb5db2cbfc88ac",
|
||||
"asm": "OP_DUP OP_HASH160 a568940c7c4c961d1ff6fdf7d7f97aeb5db2cbfc OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"addresses": [
|
||||
"t1YxCnDW38Nf8ZMgw6QzQWq4YkS5KTxaGLE"
|
||||
],
|
||||
"type": "pubkeyhash"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,265 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package sync
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
"github.com/trezor/blockbook/db"
|
||||
)
|
||||
|
||||
func testConnectBlocks(t *testing.T, h *TestHandler) {
|
||||
for _, rng := range h.TestData.ConnectBlocks.SyncRanges {
|
||||
withRocksDBAndSyncWorker(t, h, rng.Lower, func(d *db.RocksDB, sw *db.SyncWorker, ch chan os.Signal) {
|
||||
upperHash, err := h.Chain.GetBlockHash(rng.Upper)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = db.ConnectBlocks(sw, func(hash string, height uint32) {
|
||||
if hash == upperHash {
|
||||
close(ch)
|
||||
}
|
||||
}, true)
|
||||
if err != nil && err != db.ErrOperationInterrupted {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
height, _, err := d.GetBestBlock()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if height < rng.Upper {
|
||||
t.Fatalf("Best block height mismatch: %d < %d", height, rng.Upper)
|
||||
}
|
||||
|
||||
t.Run("verifyBlockInfo", func(t *testing.T) { verifyBlockInfo(t, d, h, rng) })
|
||||
t.Run("verifyTransactions", func(t *testing.T) { verifyTransactions(t, d, h, rng) })
|
||||
t.Run("verifyAddresses", func(t *testing.T) { verifyAddresses(t, d, h, rng) })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func testConnectBlocksParallel(t *testing.T, h *TestHandler) {
|
||||
for _, rng := range h.TestData.ConnectBlocks.SyncRanges {
|
||||
withRocksDBAndSyncWorker(t, h, rng.Lower, func(d *db.RocksDB, sw *db.SyncWorker, ch chan os.Signal) {
|
||||
upperHash, err := h.Chain.GetBlockHash(rng.Upper)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = sw.ConnectBlocksParallel(rng.Lower, rng.Upper)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
height, hash, err := d.GetBestBlock()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if height != rng.Upper {
|
||||
t.Fatalf("Best block height mismatch: %d != %d", height, rng.Upper)
|
||||
}
|
||||
if hash != upperHash {
|
||||
t.Fatalf("Best block hash mismatch: %s != %s", hash, upperHash)
|
||||
}
|
||||
|
||||
t.Run("verifyBlockInfo", func(t *testing.T) { verifyBlockInfo(t, d, h, rng) })
|
||||
t.Run("verifyTransactions", func(t *testing.T) { verifyTransactions(t, d, h, rng) })
|
||||
t.Run("verifyAddresses", func(t *testing.T) { verifyAddresses(t, d, h, rng) })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func verifyBlockInfo(t *testing.T, d *db.RocksDB, h *TestHandler, rng Range) {
|
||||
for height := rng.Lower; height <= rng.Upper; height++ {
|
||||
block, found := h.TestData.ConnectBlocks.Blocks[height]
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
|
||||
bi, err := d.GetBlockInfo(height)
|
||||
if err != nil {
|
||||
t.Errorf("GetBlockInfo(%d) error: %s", height, err)
|
||||
continue
|
||||
}
|
||||
if bi == nil {
|
||||
t.Errorf("GetBlockInfo(%d) returned nil", height)
|
||||
continue
|
||||
}
|
||||
|
||||
if bi.Hash != block.Hash {
|
||||
t.Errorf("Block hash mismatch: %s != %s", bi.Hash, block.Hash)
|
||||
}
|
||||
|
||||
if bi.Txs != block.NoTxs {
|
||||
t.Errorf("Number of transactions in block %s mismatch: %d != %d", bi.Hash, bi.Txs, block.NoTxs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func verifyTransactions(t *testing.T, d *db.RocksDB, h *TestHandler, rng Range) {
|
||||
type txInfo struct {
|
||||
txid string
|
||||
index int32
|
||||
}
|
||||
addr2txs := make(map[string][]txInfo)
|
||||
checkMap := make(map[string][]bool)
|
||||
|
||||
for height := rng.Lower; height <= rng.Upper; height++ {
|
||||
block, found := h.TestData.ConnectBlocks.Blocks[height]
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, tx := range block.TxDetails {
|
||||
for _, vin := range tx.Vin {
|
||||
for _, a := range vin.Addresses {
|
||||
addr2txs[a] = append(addr2txs[a], txInfo{tx.Txid, ^int32(vin.Vout)})
|
||||
checkMap[a] = append(checkMap[a], false)
|
||||
}
|
||||
}
|
||||
for _, vout := range tx.Vout {
|
||||
for _, a := range vout.ScriptPubKey.Addresses {
|
||||
addr2txs[a] = append(addr2txs[a], txInfo{tx.Txid, int32(vout.N)})
|
||||
checkMap[a] = append(checkMap[a], false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for addr, txs := range addr2txs {
|
||||
err := d.GetTransactions(addr, rng.Lower, rng.Upper, func(txid string, height uint32, indexes []int32) error {
|
||||
for i, tx := range txs {
|
||||
for _, index := range indexes {
|
||||
if txid == tx.txid && index == tx.index {
|
||||
checkMap[addr][i] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
for addr, txs := range addr2txs {
|
||||
for i, tx := range txs {
|
||||
if !checkMap[addr][i] {
|
||||
t.Errorf("%s: transaction not found %+v", addr, tx)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func verifyAddresses(t *testing.T, d *db.RocksDB, h *TestHandler, rng Range) {
|
||||
parser := h.Chain.GetChainParser()
|
||||
|
||||
for height := rng.Lower; height <= rng.Upper; height++ {
|
||||
block, found := h.TestData.ConnectBlocks.Blocks[height]
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, tx := range block.TxDetails {
|
||||
ta, err := d.GetTxAddresses(tx.Txid)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if ta == nil {
|
||||
t.Errorf("Tx %s: not found in TxAddresses", tx.Txid)
|
||||
continue
|
||||
}
|
||||
|
||||
txInfo := getTxInfo(tx)
|
||||
taInfo, err := getTaInfo(parser, ta)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if ta.Height != height {
|
||||
t.Errorf("Tx %s: block height mismatch: %d != %d", tx.Txid, ta.Height, height)
|
||||
continue
|
||||
}
|
||||
|
||||
if len(txInfo.inputs) > 0 && !reflect.DeepEqual(taInfo.inputs, txInfo.inputs) {
|
||||
t.Errorf("Tx %s: inputs mismatch: got %q, want %q", tx.Txid, taInfo.inputs, txInfo.inputs)
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(taInfo.outputs, txInfo.outputs) {
|
||||
t.Errorf("Tx %s: outputs mismatch: got %q, want %q", tx.Txid, taInfo.outputs, txInfo.outputs)
|
||||
}
|
||||
|
||||
if taInfo.valOutSat.Cmp(&txInfo.valOutSat) != 0 {
|
||||
t.Errorf("Tx %s: total output amount mismatch: got %s, want %s",
|
||||
tx.Txid, taInfo.valOutSat.String(), txInfo.valOutSat.String())
|
||||
}
|
||||
|
||||
if len(txInfo.inputs) > 0 {
|
||||
treshold := "0.0001"
|
||||
fee := new(big.Int).Sub(&taInfo.valInSat, &taInfo.valOutSat)
|
||||
if strings.Compare(parser.AmountToDecimalString(fee), treshold) > 0 {
|
||||
t.Errorf("Tx %s: suspicious amounts: input ∑ [%s] - output ∑ [%s] > %s",
|
||||
tx.Txid, taInfo.valInSat.String(), taInfo.valOutSat.String(), treshold)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type txInfo struct {
|
||||
inputs []string
|
||||
outputs []string
|
||||
valInSat big.Int
|
||||
valOutSat big.Int
|
||||
}
|
||||
|
||||
func getTxInfo(tx *bchain.Tx) *txInfo {
|
||||
info := &txInfo{inputs: []string{}, outputs: []string{}}
|
||||
|
||||
for _, vin := range tx.Vin {
|
||||
for _, a := range vin.Addresses {
|
||||
info.inputs = append(info.inputs, a)
|
||||
}
|
||||
}
|
||||
for _, vout := range tx.Vout {
|
||||
for _, a := range vout.ScriptPubKey.Addresses {
|
||||
info.outputs = append(info.outputs, a)
|
||||
}
|
||||
info.valOutSat.Add(&info.valOutSat, &vout.ValueSat)
|
||||
}
|
||||
|
||||
return info
|
||||
}
|
||||
|
||||
func getTaInfo(parser bchain.BlockChainParser, ta *db.TxAddresses) (*txInfo, error) {
|
||||
info := &txInfo{inputs: []string{}, outputs: []string{}}
|
||||
|
||||
for i := range ta.Inputs {
|
||||
info.valInSat.Add(&info.valInSat, &ta.Inputs[i].ValueSat)
|
||||
addrs, s, err := ta.Inputs[i].Addresses(parser)
|
||||
if err == nil && s {
|
||||
for _, a := range addrs {
|
||||
info.inputs = append(info.inputs, a)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for i := range ta.Outputs {
|
||||
info.valOutSat.Add(&info.valOutSat, &ta.Outputs[i].ValueSat)
|
||||
addrs, s, err := ta.Outputs[i].Addresses(parser)
|
||||
if err == nil && s {
|
||||
for _, a := range addrs {
|
||||
info.outputs = append(info.outputs, a)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return info, nil
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
// Package sync implements integration tests of synchronization code
|
||||
package sync
|
||||
@ -1,53 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package sync
|
||||
|
||||
import "github.com/trezor/blockbook/bchain"
|
||||
|
||||
type fakeBlockChain struct {
|
||||
bchain.BlockChain
|
||||
returnFakes bool
|
||||
fakeBlocks map[uint32]BlockID
|
||||
bestHeight uint32
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBestBlockHash() (v string, err error) {
|
||||
return c.GetBlockHash(c.bestHeight)
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBestBlockHeight() (v uint32, err error) {
|
||||
return c.bestHeight, nil
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBlockHash(height uint32) (v string, err error) {
|
||||
if height > c.bestHeight {
|
||||
return "", bchain.ErrBlockNotFound
|
||||
}
|
||||
if c.returnFakes {
|
||||
if b, found := c.fakeBlocks[height]; found {
|
||||
return b.Hash, nil
|
||||
}
|
||||
}
|
||||
return c.BlockChain.GetBlockHash(height)
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) GetBlock(hash string, height uint32) (*bchain.Block, error) {
|
||||
if height > 0 && height > c.bestHeight {
|
||||
return nil, bchain.ErrBlockNotFound
|
||||
}
|
||||
if c.returnFakes {
|
||||
if hash == "" && height > 0 {
|
||||
var err error
|
||||
hash, err = c.GetBlockHash(height)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
b, err := c.BlockChain.GetBlock(hash, height)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.Height = height
|
||||
return b, nil
|
||||
}
|
||||
@ -1,247 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package sync
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
"github.com/trezor/blockbook/db"
|
||||
)
|
||||
|
||||
func testHandleFork(t *testing.T, h *TestHandler) {
|
||||
for _, rng := range h.TestData.HandleFork.SyncRanges {
|
||||
withRocksDBAndSyncWorker(t, h, rng.Lower, func(d *db.RocksDB, sw *db.SyncWorker, ch chan os.Signal) {
|
||||
fakeBlocks := getFakeBlocks(h, rng)
|
||||
chain, err := makeFakeChain(h.Chain, fakeBlocks, rng.Upper)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
db.SetBlockChain(sw, chain)
|
||||
|
||||
sw.ConnectBlocksParallel(rng.Lower, rng.Upper)
|
||||
|
||||
height, _, err := d.GetBestBlock()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if height != rng.Upper {
|
||||
t.Fatalf("Upper block height mismatch: %d != %d", height, rng.Upper)
|
||||
}
|
||||
|
||||
fakeTxs, err := getTxs(h, d, rng, fakeBlocks)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fakeAddr2txs := getAddr2TxsMap(fakeTxs)
|
||||
|
||||
verifyTransactions2(t, d, rng, fakeAddr2txs, true)
|
||||
verifyAddresses2(t, d, h.Chain, fakeBlocks)
|
||||
|
||||
chain.returnFakes = false
|
||||
|
||||
upperHash := fakeBlocks[len(fakeBlocks)-1].Hash
|
||||
db.HandleFork(sw, rng.Upper, upperHash, func(hash string, height uint32) {
|
||||
if hash == upperHash {
|
||||
close(ch)
|
||||
}
|
||||
}, true)
|
||||
|
||||
realBlocks := getRealBlocks(h, rng)
|
||||
realTxs, err := getTxs(h, d, rng, realBlocks)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
realAddr2txs := getAddr2TxsMap(realTxs)
|
||||
|
||||
verifyTransactions2(t, d, rng, fakeAddr2txs, false)
|
||||
verifyTransactions2(t, d, rng, realAddr2txs, true)
|
||||
verifyAddresses2(t, d, h.Chain, realBlocks)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func verifyAddresses2(t *testing.T, d *db.RocksDB, chain bchain.BlockChain, blks []BlockID) {
|
||||
parser := chain.GetChainParser()
|
||||
|
||||
for _, b := range blks {
|
||||
txs, err := getBlockTxs(chain, b.Hash)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
for _, tx := range txs {
|
||||
ta, err := d.GetTxAddresses(tx.Txid)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if ta == nil {
|
||||
t.Errorf("Tx %s: not found in TxAddresses", tx.Txid)
|
||||
continue
|
||||
}
|
||||
|
||||
txInfo := getTxInfo(&tx)
|
||||
taInfo, err := getTaInfo(parser, ta)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if ta.Height != b.Height {
|
||||
t.Errorf("Tx %s: block height mismatch: %d != %d", tx.Txid, ta.Height, b.Height)
|
||||
continue
|
||||
}
|
||||
|
||||
if len(txInfo.inputs) > 0 && !reflect.DeepEqual(taInfo.inputs, txInfo.inputs) {
|
||||
t.Errorf("Tx %s: inputs mismatch: got %q, want %q", tx.Txid, taInfo.inputs, txInfo.inputs)
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(taInfo.outputs, txInfo.outputs) {
|
||||
t.Errorf("Tx %s: outputs mismatch: got %q, want %q", tx.Txid, taInfo.outputs, txInfo.outputs)
|
||||
}
|
||||
|
||||
if taInfo.valOutSat.Cmp(&txInfo.valOutSat) != 0 {
|
||||
t.Errorf("Tx %s: total output amount mismatch: got %s, want %s",
|
||||
tx.Txid, taInfo.valOutSat.String(), txInfo.valOutSat.String())
|
||||
}
|
||||
|
||||
if len(txInfo.inputs) > 0 {
|
||||
treshold := "0.0001"
|
||||
fee := new(big.Int).Sub(&taInfo.valInSat, &taInfo.valOutSat)
|
||||
if strings.Compare(parser.AmountToDecimalString(fee), treshold) > 0 {
|
||||
t.Errorf("Tx %s: suspicious amounts: input ∑ [%s] - output ∑ [%s] > %s",
|
||||
tx.Txid, taInfo.valInSat.String(), taInfo.valOutSat.String(), treshold)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func verifyTransactions2(t *testing.T, d *db.RocksDB, rng Range, addr2txs map[string][]string, exist bool) {
|
||||
noErrs := 0
|
||||
for addr, txs := range addr2txs {
|
||||
checkMap := make(map[string]bool, len(txs))
|
||||
for _, txid := range txs {
|
||||
checkMap[txid] = false
|
||||
}
|
||||
|
||||
err := d.GetTransactions(addr, rng.Lower, rng.Upper, func(txid string, height uint32, indexes []int32) error {
|
||||
for _, index := range indexes {
|
||||
if index >= 0 {
|
||||
checkMap[txid] = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
for _, txid := range txs {
|
||||
if checkMap[txid] != exist {
|
||||
auxverb := "wasn't"
|
||||
if !exist {
|
||||
auxverb = "was"
|
||||
}
|
||||
t.Errorf("%s: transaction %s %s found [expected = %t]", addr, txid, auxverb, exist)
|
||||
noErrs++
|
||||
if noErrs >= 10 {
|
||||
t.Fatal("Too many errors")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getFakeBlocks(h *TestHandler, rng Range) []BlockID {
|
||||
blks := make([]BlockID, 0, rng.Upper-rng.Lower+1)
|
||||
for i := rng.Lower; i <= rng.Upper; i++ {
|
||||
if b, found := h.TestData.HandleFork.FakeBlocks[i]; found {
|
||||
blks = append(blks, b)
|
||||
}
|
||||
}
|
||||
return blks
|
||||
}
|
||||
|
||||
func getRealBlocks(h *TestHandler, rng Range) []BlockID {
|
||||
blks := make([]BlockID, 0, rng.Upper-rng.Lower+1)
|
||||
for _, b := range h.TestData.HandleFork.RealBlocks {
|
||||
if b.Height >= rng.Lower && b.Height <= rng.Upper {
|
||||
blks = append(blks, b)
|
||||
}
|
||||
}
|
||||
return blks
|
||||
}
|
||||
|
||||
func makeFakeChain(chain bchain.BlockChain, blks []BlockID, upper uint32) (*fakeBlockChain, error) {
|
||||
if blks[len(blks)-1].Height != upper {
|
||||
return nil, fmt.Errorf("Range must end with fake block in order to emulate fork [%d != %d]", blks[len(blks)-1].Height, upper)
|
||||
}
|
||||
mBlks := make(map[uint32]BlockID, len(blks))
|
||||
for i := range blks {
|
||||
mBlks[blks[i].Height] = blks[i]
|
||||
}
|
||||
return &fakeBlockChain{
|
||||
BlockChain: chain,
|
||||
returnFakes: true,
|
||||
fakeBlocks: mBlks,
|
||||
bestHeight: upper,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func getTxs(h *TestHandler, d *db.RocksDB, rng Range, blks []BlockID) ([]bchain.Tx, error) {
|
||||
res := make([]bchain.Tx, 0, (rng.Upper-rng.Lower+1)*2000)
|
||||
|
||||
for _, b := range blks {
|
||||
bi, err := d.GetBlockInfo(b.Height)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if bi.Hash != b.Hash {
|
||||
return nil, fmt.Errorf("Block hash mismatch: %s != %s", bi.Hash, b.Hash)
|
||||
}
|
||||
|
||||
txs, err := getBlockTxs(h.Chain, b.Hash)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = append(res, txs...)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func getBlockTxs(chain bchain.BlockChain, hash string) ([]bchain.Tx, error) {
|
||||
b, err := chain.GetBlock(hash, 0)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("GetBlock: %s", err)
|
||||
}
|
||||
parser := chain.GetChainParser()
|
||||
for i := range b.Txs {
|
||||
err := setTxAddresses(parser, &b.Txs[i])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("setTxAddresses [%s]: %s", b.Txs[i].Txid, err)
|
||||
}
|
||||
}
|
||||
return b.Txs, nil
|
||||
}
|
||||
|
||||
func getAddr2TxsMap(txs []bchain.Tx) map[string][]string {
|
||||
addr2txs := make(map[string][]string)
|
||||
for i := range txs {
|
||||
for j := range txs[i].Vout {
|
||||
for k := range txs[i].Vout[j].ScriptPubKey.Addresses {
|
||||
addr := txs[i].Vout[j].ScriptPubKey.Addresses[k]
|
||||
txid := txs[i].Txid
|
||||
addr2txs[addr] = append(addr2txs[addr], txid)
|
||||
}
|
||||
}
|
||||
}
|
||||
return addr2txs
|
||||
}
|
||||
@ -1,199 +0,0 @@
|
||||
//go:build integration
|
||||
|
||||
package sync
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/trezor/blockbook/bchain"
|
||||
"github.com/trezor/blockbook/common"
|
||||
"github.com/trezor/blockbook/db"
|
||||
)
|
||||
|
||||
var testMap = map[string]func(t *testing.T, th *TestHandler){
|
||||
"ConnectBlocks": testConnectBlocks,
|
||||
"ConnectBlocksParallel": testConnectBlocksParallel,
|
||||
"HandleFork": testHandleFork,
|
||||
}
|
||||
|
||||
type TestHandler struct {
|
||||
Coin string
|
||||
Chain bchain.BlockChain
|
||||
TestData *TestData
|
||||
}
|
||||
|
||||
type Range struct {
|
||||
Lower uint32 `json:"lower"`
|
||||
Upper uint32 `json:"upper"`
|
||||
}
|
||||
|
||||
type TestData struct {
|
||||
ConnectBlocks struct {
|
||||
SyncRanges []Range `json:"syncRanges"`
|
||||
Blocks map[uint32]BlockInfo `json:"blocks"`
|
||||
} `json:"connectBlocks"`
|
||||
HandleFork struct {
|
||||
SyncRanges []Range `json:"syncRanges"`
|
||||
FakeBlocks map[uint32]BlockID `json:"fakeBlocks"`
|
||||
RealBlocks map[uint32]BlockID `json:"realBlocks"`
|
||||
} `json:"handleFork"`
|
||||
}
|
||||
|
||||
type BlockID struct {
|
||||
Height uint32 `json:"height"`
|
||||
Hash string `json:"hash"`
|
||||
}
|
||||
|
||||
type BlockInfo struct {
|
||||
BlockID
|
||||
NoTxs uint32 `json:"noTxs"`
|
||||
TxDetails []*bchain.Tx `json:"txDetails"`
|
||||
}
|
||||
|
||||
func IntegrationTest(t *testing.T, coin string, chain bchain.BlockChain, mempool bchain.Mempool, testConfig json.RawMessage) {
|
||||
tests, err := getTests(testConfig)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed loading of test list: %s", err)
|
||||
}
|
||||
|
||||
parser := chain.GetChainParser()
|
||||
td, err := loadTestData(coin, parser)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed loading of test data: %s", err)
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
if f, found := testMap[test]; found {
|
||||
h := TestHandler{Coin: coin, Chain: chain, TestData: td}
|
||||
t.Run(test, func(t *testing.T) { f(t, &h) })
|
||||
} else {
|
||||
t.Errorf("%s: test not found", test)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getTests(cfg json.RawMessage) ([]string, error) {
|
||||
var v []string
|
||||
err := json.Unmarshal(cfg, &v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(v) == 0 {
|
||||
return nil, errors.New("No tests declared")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
func loadTestData(coin string, parser bchain.BlockChainParser) (*TestData, error) {
|
||||
path := filepath.Join("sync/testdata", coin+".json")
|
||||
b, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var v TestData
|
||||
err = json.Unmarshal(b, &v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, b := range v.ConnectBlocks.Blocks {
|
||||
for _, tx := range b.TxDetails {
|
||||
// convert amounts in test json to bit.Int and clear the temporary JsonValue
|
||||
for i := range tx.Vout {
|
||||
vout := &tx.Vout[i]
|
||||
vout.ValueSat, err = parser.AmountToBigInt(vout.JsonValue)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
vout.JsonValue = ""
|
||||
}
|
||||
|
||||
// get addresses parsed
|
||||
err := setTxAddresses(parser, tx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &v, nil
|
||||
}
|
||||
|
||||
func setTxAddresses(parser bchain.BlockChainParser, tx *bchain.Tx) error {
|
||||
for i := range tx.Vout {
|
||||
ad, err := parser.GetAddrDescFromVout(&tx.Vout[i])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
a, s, err := parser.GetAddressesFromAddrDesc(ad)
|
||||
if err == nil && s {
|
||||
tx.Vout[i].ScriptPubKey.Addresses = a
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func makeRocksDB(parser bchain.BlockChainParser, m *common.Metrics, is *common.InternalState) (*db.RocksDB, func(), error) {
|
||||
p, err := ioutil.TempDir("", "sync_test")
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
d, err := db.NewRocksDB(p, 1<<17, 1<<14, parser, m, false)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
d.SetInternalState(is)
|
||||
|
||||
closer := func() {
|
||||
d.Close()
|
||||
os.RemoveAll(p)
|
||||
}
|
||||
|
||||
return d, closer, nil
|
||||
}
|
||||
|
||||
var metricsRegistry = map[string]*common.Metrics{}
|
||||
|
||||
func getMetrics(name string) (*common.Metrics, error) {
|
||||
if m, found := metricsRegistry[name]; found {
|
||||
return m, nil
|
||||
} else {
|
||||
m, err := common.GetMetrics(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
metricsRegistry[name] = m
|
||||
return m, nil
|
||||
}
|
||||
}
|
||||
|
||||
func withRocksDBAndSyncWorker(t *testing.T, h *TestHandler, startHeight uint32, fn func(*db.RocksDB, *db.SyncWorker, chan os.Signal)) {
|
||||
m, err := getMetrics(h.Coin)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
is := &common.InternalState{}
|
||||
|
||||
d, closer, err := makeRocksDB(h.Chain.GetChainParser(), m, is)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer closer()
|
||||
|
||||
ch := make(chan os.Signal)
|
||||
|
||||
sw, err := db.NewSyncWorker(d, h.Chain, 8, 0, int(startHeight), false, ch, m, is)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
fn(d, sw, ch)
|
||||
}
|
||||
247
tests/sync/testdata/bcash.json
vendored
247
tests/sync/testdata/bcash.json
vendored
@ -1,247 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 550716, "upper": 550736}
|
||||
],
|
||||
"blocks": {
|
||||
"550736": {
|
||||
"height": 550736,
|
||||
"hash": "00000000000000000181e327d1165480db82d915d46b9d39232526309072e014",
|
||||
"noTxs": 6,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "020000000118a6b44b981cab21e486ee56c8bc74c58d907649842a0088bb0a80f2faa22263010000006b483045022100dea77aa13dcdd457c7bad51e7ee310046a8f8e3c370c25217010db57a60335ca022024937a8c0c179fc8ef9923694b2f7e276904ae859010dd12b46e356ce6d76147412102619a1e932ef161c58f0d8c24fbf6b5b709f8e996aa8caa7a26130240a3416176feffffff0582efe71f000000001976a914ab4c29c2e271a5378ffedfdb1a4bedd4cd571cde88ace0dced27000000001976a914cf5d4c7955cdf8bb3e516db1eb76efe538a448a588aca0910203000000001976a9148d0e5abd1c82e99670d332582ba20d423fa4323288acc4ba0800000000001976a91419f529fccd87142620546e1bbefdbc30a2a93a6188ac18841300000000001976a9149c90ec9c987a451961ea29a29e265c4db0466a2788ac4e670800",
|
||||
"txid": "c100893fc0fb74c38277978a78433aa92df5473d94e1651962fff0e55c5762fc",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "6322a2faf2800abb88002a844976908dc574bcc856ee86e421ab1c984bb4a618",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100dea77aa13dcdd457c7bad51e7ee310046a8f8e3c370c25217010db57a60335ca022024937a8c0c179fc8ef9923694b2f7e276904ae859010dd12b46e356ce6d76147412102619a1e932ef161c58f0d8c24fbf6b5b709f8e996aa8caa7a26130240a3416176"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 5.35293826,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914ab4c29c2e271a5378ffedfdb1a4bedd4cd571cde88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 6.699,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914cf5d4c7955cdf8bb3e516db1eb76efe538a448a588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.505,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9148d0e5abd1c82e99670d332582ba20d423fa4323288ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.005721,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91419f529fccd87142620546e1bbefdbc30a2a93a6188ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01279,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9149c90ec9c987a451961ea29a29e265c4db0466a2788ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1538669466,
|
||||
"blocktime": 1538669466
|
||||
},
|
||||
{
|
||||
"hex": "020000000e34620707fc49a213e57c18880360c465c51b3e8709e26829229bf6e0499cf1d9010000006a473044022057269d92e28fc3956075172173ef67a1f8e8e81bfe3a94e139373b5d8bfbace402202e6d80dcf22ce50ced02df68161c8af3f95476c498cc36f0b8450934fcf6387441210209bd24ca51b659d8950af12363513af576e776131eaad2baf72cf2d5ed2db4d0feffffff6991b494656029ed424f149c7fce99089a02dd534cc4b657312ac61e07691845010000006a4730440220773b5faf496664b9da746853148b9f4e65d7901b9e775f0d304f60bb45b6bce702207c725522f19c2ab1e40012ba76443368005ab45e50faff706b8a9f4e4f1ade294121029f5115229faf57ec14b710bbbb71cea99663f1987b0642095d957f4365ae8189feffffff922caf594105198fef72665241286caceba276ccd4f25de230d0154d01d20bf4010000006a4730440220232a37b6f939395d4acb5ea6deb95894833a08eceb7b47cd26f54f9b6ea0c0630220284837d62429c2d919e5371e461436a8b2f8364e5a391d2620c3da943f6da7734121034032e450981630d01d6f7f67b2f0984a4f8b447b8c17da16d448f3b911fb6e31feffffff1b663b64fa1d070e1c557bf51f9f9bb3ff1d57e7bb6699487fe6465e6124d357000000006b483045022100d1b020e2d6b54ee90bada53872669921b5dc532863a0d4195958248ac74e7233022025f89661164946dc4318b7f2a21aa034847cee15b1597ece4399931f8b8ebe724121035fa81b02f2a72f9e8a35ed2f4fc1913a3aa74a1991d4b125e895168f015fe399feffffff5b3306f9d512292ae2644af096ab1529b6caff7cc1a0d233fc3a7d3850165073010000006a47304402202014a66e2a6c27f9eda4e87f1495764995507e9b7379f7cea58ba8c344e1ab770220446218231005a000e8f20abfba75e964ebe4cef5d3e4f60bc6be46a548ad7c71412102c384cca7a64cb48f7dc3a8ded4ee0ac07146108799fcb6020c07a7b166661699feffffff63049d8a5b57abf73f080d38d28ea14d159589993910ffa1c1d4a566fe0a4bfe010000006b483045022100b3584a86c1dc3481af9d9a75ebc421d78c35f2818c4b4366d8be383732d7aa4c022029c09ec4c4fc181b3cbebe4634a4fded19288559972e551d8382a4140f44a1794121024c066efd26424849d0a15910d0a49ced61cd7b2c311d50ac0f95bd5a9d609a83feffffff27e91003f5c59999d0c78e278b6eca1ee1a6fed82bb60e92a5946443cd73a3ba010000006a47304402200b88b727cf75ade32a1cf6915bc6cfa1e9102813c4d69db5fac613170a205f22022016bebf2825c288d24732772fff1376936502dc79789ee5cf3879e2bf2564fe58412102a5e690c5f8218ac5521a0ea3b1f0e59d6ba1c17d938659affa585a9d81799cbafeffffffa37670dd96e4814d30487edb4b647d48dcd2fd81ab3f1f9f3c669ef93fa3f9fe010000006a473044022064f2ed5f821b0e98fb556eadf5a5636e36e98f965796baf2ff0ad0080f4e68e7022010891d52d74f1dc55d861ad4898ec18318345ed2b358c698213944b381ab900e412102beb30e14403c4a03277d559019b60cd8fb877872896565fc0cdebb843797accdfeffffff1c7bb2fa455084c1447914819004365df5500a2fc32d9e6250fd74c795082590010000006b483045022100a73951625dc0635ec373851730b5d268c60b36fcbbcda85228452176024a1db30220332ddb3940c0d05c215a41bb751a77d1969e240a3dd3612e7b2ec49913907761412103cf972121caef0095019ae80fc3a91cc3aa3590f57ad5751319b1a5bde03549bcfeffffff50540eee49c962f60790966073658688b74a6fc1c7dbd846f114405143ab9267010000006b483045022100d2487d304222d511d3c2645315f4821486f250c2edba85c1aec5ce5604ab6f0b0220275d210b5c97c90f275be2193413792511bfaa6d3338ea418fc01cbba42f96334121037cff19a246685228edd8df2c7dd5ed1efa1d779e8ce9ae99274c20912922bd59feffffff999e5c78b01055b92f36e277c8fda3f0253cecf8b9a7640fb85b0ebd79b58dc5000000006a473044022010e90626ae890f8d9ac5be7b780f93269794f897732d4ca78b45797994b88ab402200fe4f787e4b5cf66a29b7a8f0a07b6a85d7a9ea18b89f216e3211b53641032bd4121030803961c4606e6cacba6b1ddd615a35a3abaaec945f60245da9e777d23975fdcfefffffff27534af3a65ee1b60692cead34519e798bf01bd108a6e5ec6f6422bfe605820010000006b483045022100ae8a1a285a324544e588215e878c02d0db4853bb4064dbb7babde6f9d403738202201caab0d5afdbda4ee6a27f9e10fec2045717ac63b55ac647a5c2a5440c7c00c6412102ade72a40797ce9bf5662169d3317c1bd31455b086ecddbdc1bcb4cdf8ba6fc89feffffff40c16f37c67b80f53cf6fd906c3c53922bc21c050d560464258e45993bc20e92000000006a47304402205acc6b45d4c3e330a45dcd4ef69840edcd2b31da247151e741c0468f8e65ae98022032da991edacd2b5437a44bd2463a5f93ef1b32f3467d5748ceed5c70aa5eac1041210221099010e3629434851ceb0c5992388b815e9290b78aef55de30a08f73c29716feffffff4b7ebd29cb82e8cef3f7ebb275edf7f8604ae67821f137a4a3a309920431bd24000000006a47304402207a0f2ad56df4bb879fd645c2cf07d034079ff0574cbe54bf51234968c19f526802207b25da2a8304a4e1f8d4a78f0c7902e9eef647a856c6f5193bed10d1fa26b338412102aa396f2b3bdbc39134b4e1f52d02ec83d0cee811d35ae78a539c8428781f3876feffffff02dea0446d000000001976a914d1e5cdc2076e9e4890d5f5d0356dc4543b86e85d88ac033b0f00000000001976a91418195caf282889538a9ed9958bcc47a6bf7326b388ac00000000",
|
||||
"txid": "28abbf7f1360142b11534051aac3fb05a26815cef4a8a726feb761a6e24bdf34",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "d9f19c49e0f69b222968e209873e1bc565c4600388187ce513a249fc07076234",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "473044022057269d92e28fc3956075172173ef67a1f8e8e81bfe3a94e139373b5d8bfbace402202e6d80dcf22ce50ced02df68161c8af3f95476c498cc36f0b8450934fcf6387441210209bd24ca51b659d8950af12363513af576e776131eaad2baf72cf2d5ed2db4d0"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "451869071ec62a3157b6c44c53dd029a0899ce7f9c144f42ed29606594b49169",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220773b5faf496664b9da746853148b9f4e65d7901b9e775f0d304f60bb45b6bce702207c725522f19c2ab1e40012ba76443368005ab45e50faff706b8a9f4e4f1ade294121029f5115229faf57ec14b710bbbb71cea99663f1987b0642095d957f4365ae8189"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "f40bd2014d15d030e25df2d4cc76a2ebac6c2841526672ef8f19054159af2c92",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220232a37b6f939395d4acb5ea6deb95894833a08eceb7b47cd26f54f9b6ea0c0630220284837d62429c2d919e5371e461436a8b2f8364e5a391d2620c3da943f6da7734121034032e450981630d01d6f7f67b2f0984a4f8b447b8c17da16d448f3b911fb6e31"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "57d324615e46e67f489966bbe7571dffb39b9f1ff57b551c0e071dfa643b661b",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100d1b020e2d6b54ee90bada53872669921b5dc532863a0d4195958248ac74e7233022025f89661164946dc4318b7f2a21aa034847cee15b1597ece4399931f8b8ebe724121035fa81b02f2a72f9e8a35ed2f4fc1913a3aa74a1991d4b125e895168f015fe399"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "73501650387d3afc33d2a0c17cffcab62915ab96f04a64e22a2912d5f906335b",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202014a66e2a6c27f9eda4e87f1495764995507e9b7379f7cea58ba8c344e1ab770220446218231005a000e8f20abfba75e964ebe4cef5d3e4f60bc6be46a548ad7c71412102c384cca7a64cb48f7dc3a8ded4ee0ac07146108799fcb6020c07a7b166661699"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "fe4b0afe66a5d4c1a1ff1039998995154da18ed2380d083ff7ab575b8a9d0463",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b3584a86c1dc3481af9d9a75ebc421d78c35f2818c4b4366d8be383732d7aa4c022029c09ec4c4fc181b3cbebe4634a4fded19288559972e551d8382a4140f44a1794121024c066efd26424849d0a15910d0a49ced61cd7b2c311d50ac0f95bd5a9d609a83"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "baa373cd436494a5920eb62bd8fea6e11eca6e8b278ec7d09999c5f50310e927",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "47304402200b88b727cf75ade32a1cf6915bc6cfa1e9102813c4d69db5fac613170a205f22022016bebf2825c288d24732772fff1376936502dc79789ee5cf3879e2bf2564fe58412102a5e690c5f8218ac5521a0ea3b1f0e59d6ba1c17d938659affa585a9d81799cba"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "fef9a33ff99e663c9f1f3fab81fdd2dc487d644bdb7e48304d81e496dd7076a3",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "473044022064f2ed5f821b0e98fb556eadf5a5636e36e98f965796baf2ff0ad0080f4e68e7022010891d52d74f1dc55d861ad4898ec18318345ed2b358c698213944b381ab900e412102beb30e14403c4a03277d559019b60cd8fb877872896565fc0cdebb843797accd"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "90250895c774fd50629e2dc32f0a50f55d36049081147944c1845045fab27b1c",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100a73951625dc0635ec373851730b5d268c60b36fcbbcda85228452176024a1db30220332ddb3940c0d05c215a41bb751a77d1969e240a3dd3612e7b2ec49913907761412103cf972121caef0095019ae80fc3a91cc3aa3590f57ad5751319b1a5bde03549bc"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "6792ab43514014f146d8dbc7c16f4ab78886657360969007f662c949ee0e5450",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100d2487d304222d511d3c2645315f4821486f250c2edba85c1aec5ce5604ab6f0b0220275d210b5c97c90f275be2193413792511bfaa6d3338ea418fc01cbba42f96334121037cff19a246685228edd8df2c7dd5ed1efa1d779e8ce9ae99274c20912922bd59"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "c58db579bd0e5bb80f64a7b9f8ec3c25f0a3fdc877e2362fb95510b0785c9e99",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "473044022010e90626ae890f8d9ac5be7b780f93269794f897732d4ca78b45797994b88ab402200fe4f787e4b5cf66a29b7a8f0a07b6a85d7a9ea18b89f216e3211b53641032bd4121030803961c4606e6cacba6b1ddd615a35a3abaaec945f60245da9e777d23975fdc"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "205860fe2b42f6c65e6e8a10bd01bf98e71945d3ea2c69601bee653aaf3475f2",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100ae8a1a285a324544e588215e878c02d0db4853bb4064dbb7babde6f9d403738202201caab0d5afdbda4ee6a27f9e10fec2045717ac63b55ac647a5c2a5440c7c00c6412102ade72a40797ce9bf5662169d3317c1bd31455b086ecddbdc1bcb4cdf8ba6fc89"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "920ec23b99458e256404560d051cc22b92533c6c90fdf63cf5807bc6376fc140",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402205acc6b45d4c3e330a45dcd4ef69840edcd2b31da247151e741c0468f8e65ae98022032da991edacd2b5437a44bd2463a5f93ef1b32f3467d5748ceed5c70aa5eac1041210221099010e3629434851ceb0c5992388b815e9290b78aef55de30a08f73c29716"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "24bd31049209a3a3a437f12178e64a60f8f7ed75b2ebf7f3cee882cb29bd7e4b",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402207a0f2ad56df4bb879fd645c2cf07d034079ff0574cbe54bf51234968c19f526802207b25da2a8304a4e1f8d4a78f0c7902e9eef647a856c6f5193bed10d1fa26b338412102aa396f2b3bdbc39134b4e1f52d02ec83d0cee811d35ae78a539c8428781f3876"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 18.33214174,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914d1e5cdc2076e9e4890d5f5d0356dc4543b86e85d88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00998147,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91418195caf282889538a9ed9958bcc47a6bf7326b388ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1538669466,
|
||||
"blocktime": 1538669466
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 550716, "upper": 550736}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"550733": {
|
||||
"height": 550733,
|
||||
"hash": "000000000000000000a517d8c6f3073e6872d9f3333314de7456687b228a6358"
|
||||
},
|
||||
"550734": {
|
||||
"height": 550734,
|
||||
"hash": "000000000000000001afb0d221f7e4d62937a8aa60fd9e2ecadb74554c7033f6"
|
||||
},
|
||||
"550735": {
|
||||
"height": 550735,
|
||||
"hash": "00000000000000000003b4357ac6904a5985f5175dafa31ff7e6ec4fcafec310"
|
||||
},
|
||||
"550736": {
|
||||
"height": 550736,
|
||||
"hash": "000000000000000001d21a5f91bf04b1bc68b0bee17b02763547192b8deda84b"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"550733": {
|
||||
"height": 550733,
|
||||
"hash": "000000000000000000555800282da8751765b6ae1d4979c0d024fe025d9a32da"
|
||||
},
|
||||
"550734": {
|
||||
"height": 550734,
|
||||
"hash": "0000000000000000013f343250868b23037c84082725c5ec317e1e09bf4a2dcf"
|
||||
},
|
||||
"550735": {
|
||||
"height": 550735,
|
||||
"hash": "000000000000000000cfe8d66f1f8d2f155b61425ebc2daf5d10b133edc93af5"
|
||||
},
|
||||
"550736": {
|
||||
"height": 550736,
|
||||
"hash": "00000000000000000181e327d1165480db82d915d46b9d39232526309072e014"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
185
tests/sync/testdata/bcash_testnet.json
vendored
185
tests/sync/testdata/bcash_testnet.json
vendored
@ -1,185 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 1260372, "upper": 1260392}
|
||||
],
|
||||
"blocks": {
|
||||
"1260392": {
|
||||
"height": 1260392,
|
||||
"hash": "00000000288329200dc788719c9f703d03efcb5a547c0b115fb75da74853f533",
|
||||
"noTxs": 84,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "01000000026f54f3d4af8b5703286fd80c35daf28f15a0aa89e821b1dad3505fe1ee0a4ccb010000006a473044022020bd040b64be0b1cedad56094d14915234aaf0f2929654415929d1c407d78ee102201d14095f485f85f7db18db4b47b32c0f183230dd6bf3ab6a2d9e90ee0669ace0412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f00000000354ef9c8d3378993afcbfdd3aabc91427eda790e45bb3266e070f40a0d338672000000006a47304402205c3f184e710dfb7b3deb07c5ff5bfea5732178fcda4331a400ca4fa389757d150220669359e5c9ce3b7141a84dd2ae96e48320862457658dfb58da27a862ad9e9450412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f0000000003501608000000000017a9145c253d296fafb232d99dcec34dd709590b71656a87a4f31700000000001976a9146d58051f5adb29b305f74f41f98b39ad4f35ca8288ac00000000000000003a6a04006667700365746804000000012a30784546664139353731373065373834354333463264343839624230454336384231453030303935326400000000",
|
||||
"txid": "f99a80a71f6775bfac0c0c7452bd351d27b31076e717f4add1df9d9e3029754f",
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "cb4c0aeee15f50d3dab121e889aaa0158ff2da350cd86f2803578bafd4f3546f",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "473044022020bd040b64be0b1cedad56094d14915234aaf0f2929654415929d1c407d78ee102201d14095f485f85f7db18db4b47b32c0f183230dd6bf3ab6a2d9e90ee0669ace0412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f"
|
||||
},
|
||||
"sequence": 0
|
||||
},
|
||||
{
|
||||
"txid": "7286330d0af470e06632bb450e79da7e4291bcaad3fdcbaf938937d3c8f94e35",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402205c3f184e710dfb7b3deb07c5ff5bfea5732178fcda4331a400ca4fa389757d150220669359e5c9ce3b7141a84dd2ae96e48320862457658dfb58da27a862ad9e9450412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f"
|
||||
},
|
||||
"sequence": 0
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.0053,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9145c253d296fafb232d99dcec34dd709590b71656a87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.015697,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9146d58051f5adb29b305f74f41f98b39ad4f35ca8288ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "6a04006667700365746804000000012a307845466641393537313730653738343543334632643438396242304543363842314530303039353264"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1538728768,
|
||||
"blocktime": 1538728768
|
||||
},
|
||||
{
|
||||
"hex": "02000000017bfacb87e6fb974f63b141b5f294e8e22215e32b7ecccdc017246b1fed4661cd000000006b483045022100eebb1b8d09bd46b6afaddeb1c5d09abeb3a9a0e4b8213358ea283ad1fe473c1b0220662db98e7ba80cb12f4f11b659e1cb295cefec34bd7df6740a99a93eda4c07c14121021af5e582c17e65bae40cf5ed8f04ea99ac9834b9741278eda2680489db900dc9feffffff026d646c01000000001976a9143004753f7e48481d5cb75197611de0fb4ccb6e7388ac92136a3b1e0000001976a9141dbe4a3ba19009b8f7380f7213dff950681646e888ac673b1300",
|
||||
"txid": "f594c87948db4fae47609280f9593201fc3bf1012a9d0fab47265f931bd38e89",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "cd6146ed1f6b2417c0cdcc7e2be31522e2e894f2b541b1634f97fbe687cbfa7b",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100eebb1b8d09bd46b6afaddeb1c5d09abeb3a9a0e4b8213358ea283ad1fe473c1b0220662db98e7ba80cb12f4f11b659e1cb295cefec34bd7df6740a99a93eda4c07c14121021af5e582c17e65bae40cf5ed8f04ea99ac9834b9741278eda2680489db900dc9"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.23880813,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143004753f7e48481d5cb75197611de0fb4ccb6e7388ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1298.4582645,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9141dbe4a3ba19009b8f7380f7213dff950681646e888ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1538728768,
|
||||
"blocktime": 1538728768
|
||||
}
|
||||
]
|
||||
},
|
||||
"1260387": {
|
||||
"height": 1260387,
|
||||
"hash": "000000002fe9bf1b030f7f23c91f9514c6b2c5fb43b4e7da2db3757bc33bc270",
|
||||
"noTxs": 67,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "0100000002e788165be663aca4c59623b46448bc5169f26d2dc52de60d4870aab7e88a62d2000000006a47304402205e108efdd93cc5263b466c046feb8f95ceac089b3af97136af80011d44db36a20220654952230c53acd9e1421bc965f60988d8c0612ce3370d58ccbcfe2fa5b271df412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f00000000a458c3e88c7becf492230588403b8e4caffd7a1272eeeed69845b06c209078f0000000006a47304402202ef72ac389f349fc325af21c9b167e3f25061b7a8a0c06667a4a84ec713a3d6002202e46355a7f3019a3868ebd5086efaafbfc9d2537538e04abaa2aaa21b717c57c412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f000000000370f305000000000017a9145c253d296fafb232d99dcec34dd709590b71656a87d87d2c00000000001976a9146d58051f5adb29b305f74f41f98b39ad4f35ca8288ac00000000000000003a6a04006667700365746804000000012a30784546664139353731373065373834354333463264343839624230454336384231453030303935326400000000",
|
||||
"txid": "2c99d9b14779d695841b99af146c491d701fbedc6919458cfcbef4f89ea93318",
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "d2628ae8b7aa70480de62dc52d6df26951bc4864b42396c5a4ac63e65b1688e7",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402205e108efdd93cc5263b466c046feb8f95ceac089b3af97136af80011d44db36a20220654952230c53acd9e1421bc965f60988d8c0612ce3370d58ccbcfe2fa5b271df412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f"
|
||||
},
|
||||
"sequence": 0
|
||||
},
|
||||
{
|
||||
"txid": "f07890206cb04598d6eeee72127afdaf4c8e3b4088052392f4ec7b8ce8c358a4",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202ef72ac389f349fc325af21c9b167e3f25061b7a8a0c06667a4a84ec713a3d6002202e46355a7f3019a3868ebd5086efaafbfc9d2537538e04abaa2aaa21b717c57c412103758d7df1e4f797e0e68303deb91c06eebcaae2b5bab5151f8e2008990c957b0f"
|
||||
},
|
||||
"sequence": 0
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.0039,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9145c253d296fafb232d99dcec34dd709590b71656a87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.029158,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9146d58051f5adb29b305f74f41f98b39ad4f35ca8288ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "6a04006667700365746804000000012a307845466641393537313730653738343543334632643438396242304543363842314530303039353264"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1538722614,
|
||||
"blocktime": 1538722614
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 1260382, "upper": 1260387}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"1260385": {
|
||||
"height": 1260385,
|
||||
"hash": "0000000089ef3930311cd2354444afcf258f87406350453bbbbd5cf7786780f3"
|
||||
},
|
||||
"1260386": {
|
||||
"height": 1260386,
|
||||
"hash": "00000000a2c66f3260a9bafe33ef1618fa96d50743c70c23d175efdfba521319"
|
||||
},
|
||||
"1260387": {
|
||||
"height": 1260387,
|
||||
"hash": "0000000000e02e14a16e08fd6a8b36597b969c25dfc7c96f63c850e0554ae621"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"1260385": {
|
||||
"height": 1260385,
|
||||
"hash": "000000006869aa2b332772556fe036e2df2c74143397a57835029b391db7671c"
|
||||
},
|
||||
"1260386": {
|
||||
"height": 1260386,
|
||||
"hash": "0000000077240793646ed50f4f4faaeeb4428f8ac0415f66274667a091577738"
|
||||
},
|
||||
"1260387": {
|
||||
"height": 1260387,
|
||||
"hash": "000000002fe9bf1b030f7f23c91f9514c6b2c5fb43b4e7da2db3757bc33bc270"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
233
tests/sync/testdata/bellcoin.json
vendored
233
tests/sync/testdata/bellcoin.json
vendored
@ -1,233 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 214679, "upper": 214699}
|
||||
],
|
||||
"blocks": {
|
||||
"214699": {
|
||||
"height": 214699,
|
||||
"hash": "00000143884495d2d259cfe9ef7643c56481d30fbf7d78f0d90a35ebe79f49ef",
|
||||
"noTxs": 2,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "0200000000010445e8550a734be971457dc77f227fb181b2ba106443343c446d1af812e746106a0a000000171600149be313ed4306437cd38cf1431e483fe1734f1e1efeffffff7d4f15c461234023ed35bf6540051168344c7f603370f3a1cf7d38b09a36f510010000006b483045022100fd414150a693e58456314b350c10df5e1be8d11a7f05e4cfea70185d25e5022c022071c8ccbab7c07e867e18fa6a68466aac7ed26f81a0e27c40c97e29c8b5b90d2a0121027ba3f5396db721177d18587cd20e332179c31b8536acf8c918366de6e765fac9feffffffa3c52614b84afbcd6e9436e0e63b5ec342258a685566f77560267bba643190b10000000017160014e1231b0c00e8b4cfd7c2ca7d60cd33163a969b6afeffffffaeb6794fca576d87fa39e13ab72f536546cb8303020187baa238d670bfa4ed2d010000006a473044022043944c7a03b599d7d27e7d72a71e3508256fc49180f7a587b3e36c9f30ce3a81022045d994ad4f1d8da96d4541d3d0b8fcc64f0f3bf79e383dc37c2c20fae6ef74ef0121027ba3f5396db721177d18587cd20e332179c31b8536acf8c918366de6e765fac9feffffff131cd66701000000001976a9140bf90017ae9670c23373bc13d9c539610551ad9388ac98cfe104000000001976a914df0eb8e4d33c5fa97f1269db1022b6c73196788888ac9ef415080000000017a914fe888a5fe791c9ac76bdc675a7b596cf92678c38879fca2304000000001976a9149dc61afcf11e9cd2e30198a5f6e81f9fce9f02bd88aca3a8cd01000000001976a9141e7dc59501a484067e683066263494231efa7fab88ac2c966804000000001976a914bbeb8aa44faee468d64d29da3affc45264abe73588ac5b07fd03000000001976a9143045c8fa77215ecf0262477b3da7bc9ceb135a6f88ac0570d401000000001976a914c06b3778af739b0ad06298e5aa3b2b61d305140488ac79598805000000001976a914b431a9e3464c894ecd9d16e297afc7a260a3192f88ac50190f000000000017a914bb23b90eaf1f375b5928c31b4256d03bc16e70fd87f17fa20b000000001976a91413feccf8c11c1fec911f0cdc33ac97b80b9eeb9888acc99b14040000000017a914dde3bc4a869a78b391d813be25367905638f56a587895f2d03000000001976a9147327f5ee39c2e4f62d8a9fa422ab6df62d97edc488ac0e730302000000001976a91426fa5e6c4e579058d3f4d1dd83d99e291d4dc0c588ac63fa8c02000000001976a91404aa8d712fef8d37a7ec1036b15862da8ed4428088ac636f3b03000000001976a914e23f809d9cd6a7ad2932f9bdd87585489e7100d488ac9a168728000000001976a914d1341de4b95ee1f654c0e080e9d2a6de2d990aa088aceb4a1c0a000000001976a9143acb8a0091a159337c53e40c3bf5b38d56f4e55588ac8cbf2206000000001976a9140c06edeb8f33d0f40c7ac6770b4390f3216f5b3388ac02483045022100c9724d13b28d392859a9739d164ba5784aada6562d177b7bb7a68123bf3fbab002206c553f18aa6f01b3c2bf0a8aea5f658036cb0bd05e4e71830717a45b2ffe96ac012102af81513167ae25311d49ca9a8da65a562b28422e7ceead23f52bf335b40eef93000247304402205e947316259732b3c5b667f84fcb87f34b7c2104c5b6154061780531d620604f02205bd50167abaccb9eb6c0127b84b0f32071ce3e15678b8e9ae7057eea3d24e7d20121028aac04d910b30df3901ff6f9d5550380ef1ce4b448df4fc80ff962464ac3465c00aa460300",
|
||||
"txid": "8f187d65e24d3ec98f00db06812506d0f87844e627d5e3b4f0be51079de8aea4",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "6a1046e712f81a6d443c34436410bab281b17f227fc77d4571e94b730a55e845",
|
||||
"vout": 10,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "1600149be313ed4306437cd38cf1431e483fe1734f1e1e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "10f5369ab0387dcfa1f37033607f4c346811054065bf35ed23402361c4154f7d",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100fd414150a693e58456314b350c10df5e1be8d11a7f05e4cfea70185d25e5022c022071c8ccbab7c07e867e18fa6a68466aac7ed26f81a0e27c40c97e29c8b5b90d2a0121027ba3f5396db721177d18587cd20e332179c31b8536acf8c918366de6e765fac9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "b1903164ba7b266075f76655688a2542c35e3be6e036946ecdfb4ab81426c5a3",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "160014e1231b0c00e8b4cfd7c2ca7d60cd33163a969b6a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "2deda4bf70d638a2ba8701020383cb4665532fb73ae139fa876d57ca4f79b6ae",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "473044022043944c7a03b599d7d27e7d72a71e3508256fc49180f7a587b3e36c9f30ce3a81022045d994ad4f1d8da96d4541d3d0b8fcc64f0f3bf79e383dc37c2c20fae6ef74ef0121027ba3f5396db721177d18587cd20e332179c31b8536acf8c918366de6e765fac9"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.23582236,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9140bf90017ae9670c23373bc13d9c539610551ad9388ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.81907608,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914df0eb8e4d33c5fa97f1269db1022b6c73196788888ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.35656606,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914fe888a5fe791c9ac76bdc675a7b596cf92678c3887"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.69454495,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9149dc61afcf11e9cd2e30198a5f6e81f9fce9f02bd88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.30255267,
|
||||
"n": 4,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9141e7dc59501a484067e683066263494231efa7fab88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.73963052,
|
||||
"n": 5,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914bbeb8aa44faee468d64d29da3affc45264abe73588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.66914139,
|
||||
"n": 6,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143045c8fa77215ecf0262477b3da7bc9ceb135a6f88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.30699525,
|
||||
"n": 7,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914c06b3778af739b0ad06298e5aa3b2b61d305140488ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.92821881,
|
||||
"n": 8,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b431a9e3464c894ecd9d16e297afc7a260a3192f88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.0098952,
|
||||
"n": 9,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914bb23b90eaf1f375b5928c31b4256d03bc16e70fd87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.95198961,
|
||||
"n": 10,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91413feccf8c11c1fec911f0cdc33ac97b80b9eeb9888ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.68459465,
|
||||
"n": 11,
|
||||
"scriptPubKey": {
|
||||
"hex": "a914dde3bc4a869a78b391d813be25367905638f56a587"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.53305225,
|
||||
"n": 12,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9147327f5ee39c2e4f62d8a9fa422ab6df62d97edc488ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.33780494,
|
||||
"n": 13,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91426fa5e6c4e579058d3f4d1dd83d99e291d4dc0c588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.42793571,
|
||||
"n": 14,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91404aa8d712fef8d37a7ec1036b15862da8ed4428088ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.54226787,
|
||||
"n": 15,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e23f809d9cd6a7ad2932f9bdd87585489e7100d488ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 6.79941786,
|
||||
"n": 16,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914d1341de4b95ee1f654c0e080e9d2a6de2d990aa088ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.69626347,
|
||||
"n": 17,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143acb8a0091a159337c53e40c3bf5b38d56f4e55588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.02940556,
|
||||
"n": 18,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9140c06edeb8f33d0f40c7ac6770b4390f3216f5b3388ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1538761583,
|
||||
"blocktime": 1538761583
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 214679, "upper": 214699}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"425196": {
|
||||
"height": 214696,
|
||||
"hash": "000002039e62e10c48d8ff44ba63b4f8276cab2f5ba80da5f7347af862b83443"
|
||||
},
|
||||
"425197": {
|
||||
"height": 214697,
|
||||
"hash": "0000007f1cc433237f2d82113b25617cea914622ac3f8d0b092cb0d550f4d197"
|
||||
},
|
||||
"425198": {
|
||||
"height": 214698,
|
||||
"hash": "000002d1704bc129b8bf3c5031e8a62c2f2a786b94899bed4e1d38c56aa5bb87"
|
||||
},
|
||||
"214699": {
|
||||
"height": 214699,
|
||||
"hash": "0000018f8a049fb215e6894bc7294ec7998467db750113bda372e4210f80ca91"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"425196": {
|
||||
"height": 214696,
|
||||
"hash": "000002bce2787e6b919df505e1f80a174d82c2084c00c27489991a0365710d00"
|
||||
},
|
||||
"425197": {
|
||||
"height": 214697,
|
||||
"hash": "000002a81151dc44e8530765fb97f95bdfb1ebe1a2f6638c442d0174e086a35b"
|
||||
},
|
||||
"425198": {
|
||||
"height": 214698,
|
||||
"hash": "00000295acd630d1425755ecf481ffe7ba334360e87702aac027da31ed168404"
|
||||
},
|
||||
"214699": {
|
||||
"height": 214699,
|
||||
"hash": "00000143884495d2d259cfe9ef7643c56481d30fbf7d78f0d90a35ebe79f49ef"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
451
tests/sync/testdata/bgold.json
vendored
451
tests/sync/testdata/bgold.json
vendored
File diff suppressed because one or more lines are too long
459
tests/sync/testdata/bitcoin.json
vendored
459
tests/sync/testdata/bitcoin.json
vendored
@ -1,459 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 541224, "upper": 541255},
|
||||
{"lower": 542835, "upper": 542838}
|
||||
],
|
||||
"blocks": {
|
||||
"541224": {
|
||||
"height": 541224,
|
||||
"hash": "00000000000000000027fe3aca0241ccee4f3b103b2108457a2dfd7490aa41a8",
|
||||
"noTxs": 1880,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "02000000000101138032859ee12b6b46f2d20ab5bce9564dfcceef9b366c024c5b1bf21b33a47a01000000171600143544c8e7eacc7f624a7748e3623273145394f005feffffff02e09fc92c0000000017a91449c60d71775a5768a139d83e01665602a7319e598740420f00000000001976a91483b47502199d2599b7839ee96011b4340c5554d688ac02483045022100a788bfbc3ebb62ce034061dfe4a500de5ecad7db7c6f40c8d4af55c2d224b3dd02207aff39a1e2c422a96930a977dcb920b0ab80b35e978a7631692f887b0a49d0f0012103919187d19426a9b50012da2cfdebaf8fe45a730066f67ff628c38ce681231a9f22420800",
|
||||
"txid": "04bfdfaa2babb96581657c77729daa4da4fb1d221ba516393bab3e1a44e45c56",
|
||||
"blocktime": 1536829299,
|
||||
"time": 1536829299,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "7aa4331bf21b5b4c026c369befcefc4d56e9bcb50ad2f2466b2be19e85328013",
|
||||
"vout": 1,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "1600143544c8e7eacc7f624a7748e3623273145394f005"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 7.51411168,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a91449c60d71775a5768a139d83e01665602a7319e5987"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91483b47502199d2599b7839ee96011b4340c5554d688ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"hex": "02000000000101565ce4441a3eab3b3916a51b221dfba44daa9d72777c658165b9ab2baadfbf040000000017160014ef684f89a6656212f5659078c1111523be97f72bfeffffff0240420f00000000001976a914a885121ba438d8145a402e12b91ea1a43a8ba54b88acad5cba2c0000000017a91447f4c3bd4ecb0bd7f4d3489bf640352cab6fb6c58702483045022100f31cb0e57281dd732b20e468cd40dbd018b03631f0c0760565d1349ab46e5e29022046f754795d3a191a7731b470d5b6c5ba9f515c54d354a81e9c265fdfdcfbfd3e012103a596a6b5a398bf1d40778104d56a6317cc65981b6c28082989a4cbf74691d6f722420800",
|
||||
"txid": "b3f61e880609417a18a18a9e089e706822edd230e0a28316a30595f41eafc45f",
|
||||
"blocktime": 1536829299,
|
||||
"time": 1536829299,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "04bfdfaa2babb96581657c77729daa4da4fb1d221ba516393bab3e1a44e45c56",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "160014ef684f89a6656212f5659078c1111523be97f72b"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a885121ba438d8145a402e12b91ea1a43a8ba54b88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 7.50410925,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a91447f4c3bd4ecb0bd7f4d3489bf640352cab6fb6c587"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"541225": {
|
||||
"height": 541225,
|
||||
"hash": "00000000000000000023e1bf6bc0a71fb1340c00f256de589108a4768ea82c76",
|
||||
"noTxs": 1971,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "010000000001030d493576a4a74be8c2de4ffbc5307e27fe354241487c3c5a3a00435f960dca9a01000000232200203676b8ea63f8a38db4bd2a36ad3ecb080ff389a4fc56f85c8042b8136f1a5525ffffffffa531960755251678f3e1f0a76657dc39e71d2d069ab01f6269dc5c8d526e78af14000000fdfe0000483045022100ef26a403ec643750e5dd88211fc2a0432e1b7aa76b5f3eec6c88694947ea67bf02201942f492871eb3178e381f96372658f65e5144ade142d502be99738021f2ae7401483045022100d960c87e0e62362bb2f275c0b4f46a7e1ca1957b25585ba95310511910cca4c102200620f7535478428a2458628c0b25eeadf75fc24fafd480a01396f75dd0c1e7e9014c6952210289a0758ddbdee43fb55af018757ae15d880759ae87c152d1831056e042a3a4362102dc2256a7fcdadc5df21bb668681dcaf234cd0f933066cfc3ccb7de71ea6ab4c421038fdea78199b4554e16aa28d76741b8ad75d5265926d16b5c4cd68e2ec1f66f2253aeffffffff58a39080604b5e99dedba40beb18f5316a66d8c1c8fc054a77d72300476ff05e0000000023220020af51de0aec71ce9d8529b5d196d04c00ca5c63888ae1318ad2e8b682481e8763ffffffff027c2d15000000000017a91473829585e38acb264c21ab7e1d8d4814337c4ba287496800000000000017a91450be45be5aa3ee42827c1eb72370fde4665acfaa870400473044022079fa3a1abf6c9265592cbe2b4a7cac5855bd764f66fc7ceed9e15b5d81184b00022024e6c885cb5c9300f0a6a070b1a6a613ea1137a863253d3737a8e75327cb620f01483045022100dc8f2f4b43cf94849e238b1a94cf9ce0a9fe6e875dcef200d4a9704e29fcc1a902200186ac5327fb4c67c2b663b9ca89b7fd1078cff5851abca987beb0ae3faee31001695221021dd05af6e6e36aa7c7fa3a366f8ba5aefbfa96f8d2014d52bb912f413d4ff1662102b5ed803ebd815d2af641793fcc96dc87bbb1b982ba26b82c59d64cce2e44d2522103c0e71c8ebcf021ceb93ac97182e22c89f9b3ef3e82a59750f593f27f0b8f32c553ae00040047304402204236e7aac97e6df9af208cc0238b409e122ea4bdbee67f4df3f69c3b99ca76a60220202fe1ee41236e997ce9f96f07129dd19d7b98a0c084d74e621a01b742c5425001483045022100b34e348784d84dd9a97c3da856676d035460b11b7e62d66c2f04e770a72bafb40220794eebb88a764b14e0c648cc54f7133115348c1063e3d74b1c92282f479a01d501695221027894bff7c2f0a6faab636188dc8e9915a18f4927f21d25a3a927827e42a22f4c210284efcef0f2f18068454982e29aedbae12e8b6e463e21dfe97a29bd7a1caa559a2102d3b7ad3ad3a5719caa7d9e66ed8412f56eb3b6ce09752c2474695b7e01ec345553ae00000000",
|
||||
"txid": "3a05d0b3bbb23b23888708dbdb89b729871e1f8cce69874a03a52d401a745f2b",
|
||||
"blocktime": 1536830751,
|
||||
"time": 1536830751,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "9aca0d965f43003a5a3c7c48414235fe277e30c5fb4fdec2e84ba7a47635490d",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "2200203676b8ea63f8a38db4bd2a36ad3ecb080ff389a4fc56f85c8042b8136f1a5525"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "af786e528d5cdc69621fb09a062d1de739dc5766a7f0e1f378162555079631a5",
|
||||
"vout": 20,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "00483045022100ef26a403ec643750e5dd88211fc2a0432e1b7aa76b5f3eec6c88694947ea67bf02201942f492871eb3178e381f96372658f65e5144ade142d502be99738021f2ae7401483045022100d960c87e0e62362bb2f275c0b4f46a7e1ca1957b25585ba95310511910cca4c102200620f7535478428a2458628c0b25eeadf75fc24fafd480a01396f75dd0c1e7e9014c6952210289a0758ddbdee43fb55af018757ae15d880759ae87c152d1831056e042a3a4362102dc2256a7fcdadc5df21bb668681dcaf234cd0f933066cfc3ccb7de71ea6ab4c421038fdea78199b4554e16aa28d76741b8ad75d5265926d16b5c4cd68e2ec1f66f2253ae"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "5ef06f470023d7774a05fcc8c1d8666a31f518eb0ba4dbde995e4b608090a358",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "220020af51de0aec71ce9d8529b5d196d04c00ca5c63888ae1318ad2e8b682481e8763"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01387900,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a91473829585e38acb264c21ab7e1d8d4814337c4ba287"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00026697,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a91450be45be5aa3ee42827c1eb72370fde4665acfaa87"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"541226": {
|
||||
"height": 541226,
|
||||
"hash": "00000000000000000023fc3b42ff5da9f74c6a672a7f793860f7c03b217628ae",
|
||||
"noTxs": 2479,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "02000000014dd8ff786e18c1c48fbaece303c6da31b02013d9122091d5bb5c14e351178bd1030000006a47304402200f46c8a00c84dfc980a39f1db80b9008a06b1fdbe9893bca36ac9278ce1201e30220455a67d71d968a0a32e7d7fd99f1f32055c0d692abb009d9fdfdfb95d011f14f012102133c477d27b26eac6fc51c4452e7b7a6071b77af1869b750c14601e3821a51cafeffffff02e8f10200000000001976a914b18cf542d661fc17a04a29f91b03056e3d7f2aaa88ac51a39500000000001976a914194e18702f84b5c87f307662887ca7ec18482bc488ac28420800",
|
||||
"txid": "62665cce55418efe3dfe035d6f2c72259f1bf4a4a95dbb6bc27df39e9fd6f1fb",
|
||||
"blocktime": 1536831767,
|
||||
"time": 1536831767,
|
||||
"locktime": 541224,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "d18b1751e3145cbbd5912012d91320b031dac603e3ecba8fc4c1186e78ffd84d",
|
||||
"vout": 3,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402200f46c8a00c84dfc980a39f1db80b9008a06b1fdbe9893bca36ac9278ce1201e30220455a67d71d968a0a32e7d7fd99f1f32055c0d692abb009d9fdfdfb95d011f14f012102133c477d27b26eac6fc51c4452e7b7a6071b77af1869b750c14601e3821a51ca"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00193000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b18cf542d661fc17a04a29f91b03056e3d7f2aaa88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.09806673,
|
||||
"n": 1,
|
||||
"scriptPubkey": {
|
||||
"hex": "76a914194e18702f84b5c87f307662887ca7ec18482bc488ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"541227": {
|
||||
"height": 541227,
|
||||
"hash": "00000000000000000007d2b42e5ea24bed4aa02d18192c33b9ec7f6685acb16a",
|
||||
"noTxs": 1815,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "010000000176ccfc9ac16ced1eebb4e886169a03b9cff16610b8e1dcd8d380110537f6eff4000000006b483045022100b5417fc0e95b39ce2036d67621eb332dd9091734081108630f0521bd9fec1867022070080f1a568eb39dcbad467eb041862daedf8e7b14e3986bc8ab89947a5c8dc6012103aae7dca1bc6f38f77b767ddc6b3dd0ef86c294543c65bfd5cd6ac535f4f54dcdffffffff0206bfc901000000001976a914059272d492ba10fab46e2fe0154ae9200027974d88ac801d2c04000000001976a9145c02a3783346f0a8cd4c5918c625ab13c5be698e88ac00000000",
|
||||
"txid": "d37262282c3bdd3da47caa663fc21eda2c9db51b43f2a4bde39527fdad569308",
|
||||
"blocktime": 1536831879,
|
||||
"time": 1536831879,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "f4eff637051180d3d8dce1b81066f1cfb9039a1686e8b4eb1eed6cc19afccc76",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100b5417fc0e95b39ce2036d67621eb332dd9091734081108630f0521bd9fec1867022070080f1a568eb39dcbad467eb041862daedf8e7b14e3986bc8ab89947a5c8dc6012103aae7dca1bc6f38f77b767ddc6b3dd0ef86c294543c65bfd5cd6ac535f4f54dcd"
|
||||
},
|
||||
"addresses": ["1PE9dMki67qUYnX5J8APFTHvUJVWxEUoQP"]
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.29998854,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914059272d492ba10fab46e2fe0154ae9200027974d88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.70000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9145c02a3783346f0a8cd4c5918c625ab13c5be698e88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"541228": {
|
||||
"height": 541228,
|
||||
"hash": "0000000000000000001c2444541142d58b126ef608b5f52081aced02612d078f",
|
||||
"noTxs": 2549,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "020000000001012790904fd89e78bf372a8d79bac24ae21c0b60d65761a7fbf1002ce28d4db8fd00000000171600146432f02f2f8f1d1a7d58d83b1815cd300417404dfeffffff027dff11000000000017a91401dfd360c8b640f9da5ede7170dc369d84c3dfcf87503403000000000017a91454f7c31d5a1aac2f6b3d6b4773f62f333e2e8af8870247304402205a89be503e481e37b7175a988f7f1276e6f56d477570d3745dda126f9521bba402201cfafd0f575b6617a6f1d2c3062f398e7be43830a2786d5c9848092cc8382f600121020dc52cfdf50ad27ce9b6701e0d88d2177ad118d43c864a3cc491bd4b7ddf5dc827420800",
|
||||
"txid": "3dbf8bf9d9dc161024c08fc22c938426f975da4a1da7830257cf149c260e6f89",
|
||||
"blocktime": 1536832036,
|
||||
"time": 1536832036,
|
||||
"locktime": 541223,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "fdb84d8de22c00f1fba76157d6600b1ce24ac2ba798d2a37bf789ed84f909027",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "1600146432f02f2f8f1d1a7d58d83b1815cd300417404d"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01179517,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "a91401dfd360c8b640f9da5ede7170dc369d84c3dfcf87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00210000,
|
||||
"n": 1,
|
||||
"scriptPubkey": {
|
||||
"hex": "a91454f7c31d5a1aac2f6b3d6b4773f62f333e2e8af887"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"541255": {
|
||||
"height": 541255,
|
||||
"hash": "0000000000000000001375c3e88b4e53b687a70aba4b645ba81c93a4539d724d",
|
||||
"noTxs": 2633,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "010000000263bc2bd6ba344d39487c3c8a29eb0b71d118bef0c4318e3f9d6cd6c0a63b2e34010000006b483045022100fe6a3fb0fafa305a7cf0dd55f670e6a6469392d16bd7395ac3eecd31b48f04dc022008e4c23e7657135bb6e11727e3bc4f67aa4c827f4cfb45b27a8df531295b6a5a0121030e2844042326a3dad34937b2a577977b6d13d87a50812f351735fe1ebd999fb7ffffffff17809d201a1cb3a7da30de83f9d92b52e6f78f37c5bc6f3c105127bdb6dc9291000000006a473044022053e8788b622f6ed5ed69bffb6f2c568d42d1bb398eb6c8b9d7d011e1280c261a0220243a3346883ed0acd7a291140ddc520d43100f60e68fd4a242ec70bae95c097e0121030e2844042326a3dad34937b2a577977b6d13d87a50812f351735fe1ebd999fb7ffffffff020a39e800000000001976a914a1d8d0f5edd2bf6808d7156f2884096fd86359fe88ac00e1f505000000001976a914492f305f58b7469202526bff3200a9f2a446fb4988ac00000000",
|
||||
"txid": "dcc55f1443084d97bcf17e7d7ac1d589ea947f4940030779a40cfd9731a24a9e",
|
||||
"blocktime": 1536832036,
|
||||
"time": 1536832036,
|
||||
"locktime": 541223,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "342e3ba6c0d66c9d3f8e31c4f0be18d1710beb298a3c7c48394d34bad62bbc63",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100fe6a3fb0fafa305a7cf0dd55f670e6a6469392d16bd7395ac3eecd31b48f04dc022008e4c23e7657135bb6e11727e3bc4f67aa4c827f4cfb45b27a8df531295b6a5a0121030e2844042326a3dad34937b2a577977b6d13d87a50812f351735fe1ebd999fb7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "9192dcb6bd2751103c6fbcc5378ff7e6522bd9f983de30daa7b31c1a209d8017",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "473044022053e8788b622f6ed5ed69bffb6f2c568d42d1bb398eb6c8b9d7d011e1280c261a0220243a3346883ed0acd7a291140ddc520d43100f60e68fd4a242ec70bae95c097e0121030e2844042326a3dad34937b2a577977b6d13d87a50812f351735fe1ebd999fb7"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.15218954,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a1d8d0f5edd2bf6808d7156f2884096fd86359fe88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.00000000,
|
||||
"n": 1,
|
||||
"scriptPubkey": {
|
||||
"hex": "76a914492f305f58b7469202526bff3200a9f2a446fb4988ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"542838": {
|
||||
"height": 542838,
|
||||
"hash": "00000000000000000001e973be0770d428d3494d4e1b661aafcd8924c892648d",
|
||||
"noTxs": 31,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "0100000007763056a30225a7f9f1af67e74a7ec67b514bcf094f8790da301b931ad2c8110e000000006b48304502210095e355273d421b93123786510757e10301508de7c4d9fb0c10900c43b6d6488a02206ddcd52d5e3e09083b50b8e020e2ce3f520e45b7be748e2cf79f1dafc44e54380121037d662ed0eab74137653a05001ada5b16c9b13ee4c542666d762564ebf68e3c8bffffffffbd4d49ec91d404facffca906661a1f437ba2e01f7004a769f01e3841d753e238000000006b4830450221008c92a4c432f4b822d234ee817f544673a86263a2eb106d1fd4189f0e8aeb4f64022031ecf397a0a15eeb41ed636d2729e422f57cb8269a74ddf7696df85055d35c5b012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4ffffffff3e851c0f9f70cb40a2492d811d87a899f6e29a1299f93dc7985e39e2db782559000000006a47304402202f8942571366051dc870be96e602e9415996e7583ecb270d7102b51453c50bb9022021c529a26ea348377863f59b03321279d4775cce1877fb37e3d09eb24b39e45b012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4ffffffffc9f4fc77c61640d945f14cbf9c7ecc2a89421ed03c3c593858915c995a009273000000006b483045022100e83039eb8d55b21f90a0fbae004bb3b0f0681b7e7a4f1bfceadbe5b470cb483702203be7ce3567967a2a1cdaeb3bd47d57cffd645557ab504d1056c3294c08ec08a6012103f3422741129eb0bfb82ca77f3818371749de4c38eb5f8def51a0abfb81cc1957ffffffff395717f7dfdec0df3e2117966af1e43eca5515f7469618d403a1383b5e4bca8a020000006a4730440220071c6128864f4ee9437b27a9ccdec52961f6a481c5ba01ae993a20a1d9afdfa20220248a5209af572f0af3c922e96def6c8b1967e355a8dfeaa891e69f59c9a37e96012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4ffffffff2e9ea71c6811838ec46444f08fad8298f8fa83cb1190ccaf98950963f0e68199000000006b483045022100d84f351d070103e614487ef7e8a7f5a6d60b6c51566aa1262111f8be1cad47d702203e0f36fec153718d3ba3a1c7dd8dd7f28691f4673498680d7f094b83db357aa4012103c71e9c61b2092b415b8ae4d5107786770cff927196efd12e39ed55477baefcdeffffffff39e161ac068370063eddd3ede85c9301f23e088f1ee72ac8e12603d7e0e8d6d6000000006a473044022053eb77ad34f47bcf00fdc845119d673948e2c6c0d21e6ec82d903598b32194df0220379127f024b85b964b52d3a7f501d7dad0b77321675d5d1ba6f0dc8f09305837012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4ffffffff02bb430000000000001976a9147270edc07db25cd4a7b99e54fd3c0c76076ba02688ac00e1f5050000000017a9141458b33294f0791f682c0d181ea757730faeeca88700000000",
|
||||
"txid": "17da91b3b0590ee84b51174a76c0a61126d2ce82830230371cae549e0c070cd0",
|
||||
"blocktime": 1537791290,
|
||||
"time": 1537791290,
|
||||
"locktime": 0,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "48304502210095e355273d421b93123786510757e10301508de7c4d9fb0c10900c43b6d6488a02206ddcd52d5e3e09083b50b8e020e2ce3f520e45b7be748e2cf79f1dafc44e54380121037d662ed0eab74137653a05001ada5b16c9b13ee4c542666d762564ebf68e3c8b",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "48304502210095e355273d421b93123786510757e10301508de7c4d9fb0c10900c43b6d6488a02206ddcd52d5e3e09083b50b8e020e2ce3f520e45b7be748e2cf79f1dafc44e54380121037d662ed0eab74137653a05001ada5b16c9b13ee4c542666d762564ebf68e3c8b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "38e253d741381ef069a704701fe0a27b431f1a6606a9fccffa04d491ec494dbd",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221008c92a4c432f4b822d234ee817f544673a86263a2eb106d1fd4189f0e8aeb4f64022031ecf397a0a15eeb41ed636d2729e422f57cb8269a74ddf7696df85055d35c5b012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "592578dbe2395e98c73df999129ae2f699a8871d812d49a240cb709f0f1c853e",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202f8942571366051dc870be96e602e9415996e7583ecb270d7102b51453c50bb9022021c529a26ea348377863f59b03321279d4775cce1877fb37e3d09eb24b39e45b012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "7392005a995c915838593c3cd01e42892acc7e9cbf4cf145d94016c677fcf4c9",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100e83039eb8d55b21f90a0fbae004bb3b0f0681b7e7a4f1bfceadbe5b470cb483702203be7ce3567967a2a1cdaeb3bd47d57cffd645557ab504d1056c3294c08ec08a6012103f3422741129eb0bfb82ca77f3818371749de4c38eb5f8def51a0abfb81cc1957"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "8aca4b5e3b38a103d4189646f71555ca3ee4f16a9617213edfc0dedff7175739",
|
||||
"vout": 2,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220071c6128864f4ee9437b27a9ccdec52961f6a481c5ba01ae993a20a1d9afdfa20220248a5209af572f0af3c922e96def6c8b1967e355a8dfeaa891e69f59c9a37e96012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "9981e6f063099598afcc9011cb83faf89882ad8ff04464c48e8311681ca79e2e",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100d84f351d070103e614487ef7e8a7f5a6d60b6c51566aa1262111f8be1cad47d702203e0f36fec153718d3ba3a1c7dd8dd7f28691f4673498680d7f094b83db357aa4012103c71e9c61b2092b415b8ae4d5107786770cff927196efd12e39ed55477baefcde"
|
||||
}
|
||||
},
|
||||
{
|
||||
"txid": "d6d6e8e0d70326e1c82ae71e8f083ef201935ce8edd3dd3e06708306ac61e139",
|
||||
"vout": 0,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "473044022053eb77ad34f47bcf00fdc845119d673948e2c6c0d21e6ec82d903598b32194df0220379127f024b85b964b52d3a7f501d7dad0b77321675d5d1ba6f0dc8f09305837012102940f4b3a9737f208c8cb1fe5ae8b317d06d0ca6e63dca5a04f735eb7d42377e4"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00017339,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9147270edc07db25cd4a7b99e54fd3c0c76076ba02688ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 1.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "a9141458b33294f0791f682c0d181ea757730faeeca887"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 541224, "upper": 541255},
|
||||
{"lower": 542835, "upper": 542838}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"541253": {
|
||||
"height": 541253,
|
||||
"hash": "0000000000000000001af0987bd9f319c5a8105537b3deb54c423b299b133bb6"
|
||||
},
|
||||
"541254": {
|
||||
"height": 541254,
|
||||
"hash": "00000000000000000011eebe554e91cf26ba7897195b42997b03ec4f929b27d2"
|
||||
},
|
||||
"541255": {
|
||||
"height": 541255,
|
||||
"hash": "0000000000000000000feb2cbefe55cb4bb8cf045fac7ed4b4cc09e8f645a64c"
|
||||
},
|
||||
"542836": {
|
||||
"height": 542836,
|
||||
"hash": "000000000000000000218866194a2bc15b92d7dccca1d328a2fa6a9c0befb039"
|
||||
},
|
||||
"542837": {
|
||||
"height": 542837,
|
||||
"hash": "00000000000000000023936c5189062f9f9b05895d778c202e2f83f0d119a370"
|
||||
},
|
||||
"542838": {
|
||||
"height": 542838,
|
||||
"hash": "000000000000000000155f1289c445127d0cfc360b8cc9f2c46c5850de607307"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"541253": {
|
||||
"height": 541253,
|
||||
"hash": "000000000000000000045d55641e32a86ff313cd9d8a557d0fe9d0ab4e7eae7f"
|
||||
},
|
||||
"541254": {
|
||||
"height": 541254,
|
||||
"hash": "0000000000000000000e08972d3e7e26f30c58313dcd15ce5817b09aef0e69b7"
|
||||
},
|
||||
"541255": {
|
||||
"height": 541255,
|
||||
"hash": "0000000000000000001375c3e88b4e53b687a70aba4b645ba81c93a4539d724d"
|
||||
},
|
||||
"542836": {
|
||||
"height": 542836,
|
||||
"hash": "0000000000000000000927c61a2a3174c64f2beee103ead0f62b30354f323456"
|
||||
},
|
||||
"542837": {
|
||||
"height": 542837,
|
||||
"hash": "000000000000000000158353b8c9865c2261dc96bd780ef7d0017b2c2798c5c7"
|
||||
},
|
||||
"542838": {
|
||||
"height": 542838,
|
||||
"hash": "00000000000000000001e973be0770d428d3494d4e1b661aafcd8924c892648d"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
188
tests/sync/testdata/bitcoin_signet.json
vendored
188
tests/sync/testdata/bitcoin_signet.json
vendored
@ -1,188 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 15331, "upper": 15351}
|
||||
],
|
||||
"blocks": {
|
||||
"15343": {
|
||||
"height": 15343,
|
||||
"hash": "000001003f625cbecd53924713929b5a91b12edf4eb844f33781ecb6bb78e69b",
|
||||
"noTxs": 4,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "020000000001017983f5982048b0f79f2d9349ef681d7f3039f29e3e896130e92d2283ff0757900100000000fdffffff02002d310100000000160014691b727701f2e4aec30fe57775a7439ea8d4c8d8dc6db41c000000001600147a0adbac8308cfef483600e0dd12954dbf1314a102463043021f2e8df6e4c8a6f8fc27656710f44ca45cc9042815e1a0466f94549643d13a190220740264294e9e341700ab463fe5bc9085cbd8cf886aac4a0f310cf55b1d836725012103e9c239ec00d505e7ce6153df4f949a9ee8c6f6dfc1d4d684766be12012a730f200000000",
|
||||
"txid": "c4e39caaccb0b3ac4f0d0b59df0c067b4478b4aee6494ba12dd83a004212e020",
|
||||
"time": 1607542920,
|
||||
"blocktime": 1607542920,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "905707ff83222de93061893e9ef239307f1d68ef49932d9ff7b0482098f58379",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
},
|
||||
"sequence": 4294967293
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.2,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014691b727701f2e4aec30fe57775a7439ea8d4c8d8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 4.81586652,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "00147a0adbac8308cfef483600e0dd12954dbf1314a1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"hex": "0200000000010120e01242003ad82da14b49e6aeb478447b060cdf590b0d4facb3b0ccaa9ce3c40100000000fdffffff0240420f0000000000160014691b727701f2e4aec30fe57775a7439ea8d4c8d88d25a51c0000000016001463f22c52493943bd1b9e5be92f356cf7262de60b02473044022040e5e7f538c41c05a8b18f583f3d984cb980d08adb53e3586d1c7d5f60fc78b002203615beaae670e862bd1423e17514eda4b0979903165883e015b63779d09391650121029b9d6beb0f70bd2de94c9fb9d27c03a522662e602b0b148325730a11e9b03d1d00000000",
|
||||
"txid": "4f341d6402c637084c5d5e59b4dd2d57e56d5917028bbbdfb1ab1c467d287071",
|
||||
"time": 1607542920,
|
||||
"blocktime": 1607542920,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "c4e39caaccb0b3ac4f0d0b59df0c067b4478b4aee6494ba12dd83a004212e020",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
},
|
||||
"sequence": 4294967293
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014691b727701f2e4aec30fe57775a7439ea8d4c8d8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 4.80585101,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "001463f22c52493943bd1b9e5be92f356cf7262de60b"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"15332": {
|
||||
"height": 15332,
|
||||
"hash": "0000014b2d8f7f92dfc3b5093adf50196102dcced82d18e35b4acc2bf70538a2",
|
||||
"noTxs": 3,
|
||||
"txDetails": [
|
||||
{
|
||||
"txid": "2905c79019a54257e01fd6689fed30491d83c52fbb6b62ae87eaaa4dfa8341be",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "e1136349ee7fa69d830eb900aede1fbed47771a1020a6155698fb41322104206",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.10006478,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014d98421601a5b89d841934a6ed669288112af0c6f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.001,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014aeab6c795903122914f13d7d7d589256e8cd8e09"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "02000000000101a1e47c71920956bd0a086ba412e00e0b34439b58a9982b3ff4cb04ad66fff8bd0100000000feffffff0220a1070000000000160014aeab6c795903122914f13d7d7d589256e8cd8e094d773100000000001600143dc77e4488d63a103969edaed7727f771aa62db202473044022047861364d64366ed6c085f054a0f3f9cd0625848fff90d654af77d8c6f84ec3d02201de5167ab2d0326c3b318f72e3386e2427fb6d9136c98660c3bac175947c11250121027da83a3c50bad5cbacd6637fec4387f7cb7e8840252b8eed90461fb49d6c7ed5e33b0000",
|
||||
"time": 1607530625,
|
||||
"blocktime": 1607530625
|
||||
},
|
||||
{
|
||||
"txid": "617bdcc537aba2c7e7ec32e47e3fd422471294f508ead8e470b6bad8871e33dd",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "bdf8ff66ad04cbf43f2b98a9589b43340b0ee012a46b080abd560992717ce4a1",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": ""
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.005,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "0014aeab6c795903122914f13d7d7d589256e8cd8e09"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.03241805,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "00143dc77e4488d63a103969edaed7727f771aa62db2"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "02000000000101a1e47c71920956bd0a086ba412e00e0b34439b58a9982b3ff4cb04ad66fff8bd0100000000feffffff0220a1070000000000160014aeab6c795903122914f13d7d7d589256e8cd8e094d773100000000001600143dc77e4488d63a103969edaed7727f771aa62db202473044022047861364d64366ed6c085f054a0f3f9cd0625848fff90d654af77d8c6f84ec3d02201de5167ab2d0326c3b318f72e3386e2427fb6d9136c98660c3bac175947c11250121027da83a3c50bad5cbacd6637fec4387f7cb7e8840252b8eed90461fb49d6c7ed5e33b0000",
|
||||
"time": 1607530625,
|
||||
"blocktime": 1607530625
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 14980, "upper": 15000}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"14998": {
|
||||
"height": 14998,
|
||||
"hash": "000000bf050076a4470586bb3c382228f94d43efba8957834f55d0c46f3e1a5f"
|
||||
},
|
||||
"14999": {
|
||||
"height": 14999,
|
||||
"hash": "0000006c5ed1d034aba9ebd08e6427a97ac504af0fd5c9d99d996914e7d014d4"
|
||||
},
|
||||
"15000": {
|
||||
"height": 15000,
|
||||
"hash": "000000c90909c2a8255b746c8b83efcdbe6f0a550b35c50b96648e6f7c2a6d76"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"14998": {
|
||||
"height": 14998,
|
||||
"hash": "000000e3bce7e8d798929652939695f03311ea65db07d440d55eb5b47d56314b"
|
||||
},
|
||||
"14999": {
|
||||
"height": 14999,
|
||||
"hash": "000000baafbf2decb88c88058933c38329a59a8b961fd831e065330124427ec1"
|
||||
},
|
||||
"15000": {
|
||||
"height": 15000,
|
||||
"hash": "0000007ca36d1135444f3b1870de04313d2b458b98cf6075aa364245b3c2ddb9"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
211
tests/sync/testdata/bitcoin_testnet.json
vendored
211
tests/sync/testdata/bitcoin_testnet.json
vendored
@ -1,211 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 1414976, "upper": 1414996}
|
||||
],
|
||||
"blocks": {
|
||||
"1414996": {
|
||||
"height": 1414996,
|
||||
"hash": "00000000c55bb26fac57344bcb4a2c26579ca009a0e39ab25d9dacccbc0f6dc5",
|
||||
"noTxs": 61,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "02000000012735ecfd2c0f7948e004b8084fc75b4c37026d0b287d9d4766ab445b5938ca00000000006b483045022100de880217ae17daeff18b9533fbacd4090b8440f61a967c6fed0226c33d609b0b02201f4c01e967e6242c3e93a5da63c7a882b7fa97f4b389b4df96453edce7c051760121035610f74fe29e7065cf5ec6ab97d145fd4de788512c3b73a93f4177585c0f085affffffff0280969800000000001976a9141689469a15bff8d874f11e3b5355737d9e6dbbc488ac5c384703000000001976a914a13dbce34513db0f24c7d533b27a6ae257e4652d88ac00000000",
|
||||
"txid": "481386544e3bdfa57d0b868cb680b7bd1b5ae41d01bb8be4e298cad1577ac208",
|
||||
"time": 1538659297,
|
||||
"blocktime": 1538659297,
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "00ca38595b44ab66479d7d280b6d02374c5bc74f08b804e048790f2cfdec3527",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100de880217ae17daeff18b9533fbacd4090b8440f61a967c6fed0226c33d609b0b02201f4c01e967e6242c3e93a5da63c7a882b7fa97f4b389b4df96453edce7c051760121035610f74fe29e7065cf5ec6ab97d145fd4de788512c3b73a93f4177585c0f085a"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.1,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9141689469a15bff8d874f11e3b5355737d9e6dbbc488ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.54999132,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a13dbce34513db0f24c7d533b27a6ae257e4652d88ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"hex": "01000000023198e0c324fc3b0361d8a54069de19879b56d728d4d8d0fa96fce4445b7e2045000000006b483045022100a7d66715aae07e3086d6c13210c2b0faf49d9068c2cdb12ff8cf65884abc833c0220116c502fe699053b43b520da08deeef78d8a86b33c6e9866856a659ae8142f0d01210376f1c7f3ef21133651d7df9dbb37602beb82a20f3791f4518d38dccae9d6f165feffffff2b0e1fc2ca525eccf44b868d18189fb853a54e4646626051a93e9819809a90c8000000006a4730440220508f022bd2f7f016535309eba6d8906297e32fd678d9f8d4d1ae2e3ad026734e0220434239e26b3e60f29e25d46fb8c5d00c8e9ab3fb2c50490c667d50d8d8abdc520121022a9bb7d67b6087ffdc8e071a427ed29fb5569f5fdeab981fc4cb321c0c135f59feffffff0210270000000000001976a9145731d95537f4ce729a141690bccea71fecf533bb88ac5e580f00000000001976a914e9ad64791d16f8317020e53a31c992b832094d3088ac53971500",
|
||||
"txid": "bdcb85ad80693488efcb29f747040bc78ce3d3ba3dd298a4b1e2f9a55d15e6e8",
|
||||
"time": 1538659297,
|
||||
"blocktime": 1538659297,
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "45207e5b44e4fc96fad0d8d428d7569b8719de6940a5d861033bfc24c3e09831",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100a7d66715aae07e3086d6c13210c2b0faf49d9068c2cdb12ff8cf65884abc833c0220116c502fe699053b43b520da08deeef78d8a86b33c6e9866856a659ae8142f0d01210376f1c7f3ef21133651d7df9dbb37602beb82a20f3791f4518d38dccae9d6f165"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "c8909a8019983ea951606246464ea553b89f18188d864bf4cc5e52cac21f0e2b",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220508f022bd2f7f016535309eba6d8906297e32fd678d9f8d4d1ae2e3ad026734e0220434239e26b3e60f29e25d46fb8c5d00c8e9ab3fb2c50490c667d50d8d8abdc520121022a9bb7d67b6087ffdc8e071a427ed29fb5569f5fdeab981fc4cb321c0c135f59"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.0001,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9145731d95537f4ce729a141690bccea71fecf533bb88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01005662,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914e9ad64791d16f8317020e53a31c992b832094d3088ac"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"1414983": {
|
||||
"height": 1414983,
|
||||
"hash": "00000000128873524843cec7a4a5718736f7b3c80d6936414e6b5b01b25be443",
|
||||
"noTxs": 53,
|
||||
"txDetails": [
|
||||
{
|
||||
"txid": "a485c102d173cd577d6c9d2594c3584e45def4290f8832a6a47817862dba7799",
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "d60199408b33442d7b16de2dcf2538a815575774150e485f58a573a4b51c13e0",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100c544080e0f8a02d4f6d76d343da538d4ee348d716f4a1984e440d063ac4230f3022044e987da4e6baf5505876a269a090b3f37a19de8c09f3a4ad0bff4fdaff604e60121025fcc6fa8cea73b326f50d8f4b6aa05a47bc9672b1ba4cb5427d013df9d0c6141"
|
||||
},
|
||||
"sequence": 4294967293
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91472cbe0f81ef95f9a628c81a5c640d70074d3affb88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.09962844,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91457753cae491018bb85ef2a2b6608720c968a291e88ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "0100000001e0131cb5a473a5585f480e1574575715a83825cf2dde167b2d44338b409901d6010000006b483045022100c544080e0f8a02d4f6d76d343da538d4ee348d716f4a1984e440d063ac4230f3022044e987da4e6baf5505876a269a090b3f37a19de8c09f3a4ad0bff4fdaff604e60121025fcc6fa8cea73b326f50d8f4b6aa05a47bc9672b1ba4cb5427d013df9d0c6141fdffffff0240420f00000000001976a91472cbe0f81ef95f9a628c81a5c640d70074d3affb88ac5c059800000000001976a91457753cae491018bb85ef2a2b6608720c968a291e88ac46971500",
|
||||
"time": 1538643603,
|
||||
"blocktime": 1538643603
|
||||
},
|
||||
{
|
||||
"txid": "06d5505f7e78c9979fdcf9507a88a6d386318a752ac5f49d4aa02eeb70bcf873",
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "5624a2579c3bf48f50008c6d8e5489af61a6d57b97aa802d7bc0d07d1d94bd9a",
|
||||
"vout": 2,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009a12c53cd7264c2658035a6492c517b6719bd8908e8271ed0c270a44bcda8a260220336351e99c8fdc2a3b752a0e8f1c260ac9e0ac3eb2a5f0d09d347badf33dc7fc012103c043bdba1042b9abafed3bd48ebe43b9a2f0b5f30a34246551130933aa8c2cd1"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid": "0bb54703799d5346d19caf320a6363b42444d6741b1a322072033bff7f74f763",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "473044022005753709e182bb4cc5770c54b483907e9fa2658fc4dfac774121b4d7b31da340022033ac23bce026c730306a293f8c6de5cd4c557e5cc3e7b70224e1ace1cae64268012102a1f29b6570e5001e526f7bf296ab607539722726f672e7f07c59189cc49afdc8"
|
||||
},
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 1.233122,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914a617880fd0e8118f06e8db07ad09f3e381205aee88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "6a146f6d6e6900000000000000010000000000019577"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.00000546,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914277d14e23c46f50b43ae63fe6ba420f4d1568fb788ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "01000000029abd941d7dd0c07b2d80aa977bd5a661af89548e6d8c00508ff43b9c57a22456020000006b4830450221009a12c53cd7264c2658035a6492c517b6719bd8908e8271ed0c270a44bcda8a260220336351e99c8fdc2a3b752a0e8f1c260ac9e0ac3eb2a5f0d09d347badf33dc7fc012103c043bdba1042b9abafed3bd48ebe43b9a2f0b5f30a34246551130933aa8c2cd1ffffffff63f7747fff3b037220321a1b74d64424b463630a32af9cd146539d790347b50b000000006a473044022005753709e182bb4cc5770c54b483907e9fa2658fc4dfac774121b4d7b31da340022033ac23bce026c730306a293f8c6de5cd4c557e5cc3e7b70224e1ace1cae64268012102a1f29b6570e5001e526f7bf296ab607539722726f672e7f07c59189cc49afdc8ffffffff0348985907000000001976a914a617880fd0e8118f06e8db07ad09f3e381205aee88ac0000000000000000166a146f6d6e690000000000000001000000000001957722020000000000001976a914277d14e23c46f50b43ae63fe6ba420f4d1568fb788ac00000000",
|
||||
"time": 1538643603,
|
||||
"blocktime": 1538643603
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 1414526, "upper": 1414546}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"1414544": {
|
||||
"height": 1414544,
|
||||
"hash": "00000000aa4bbe624efc4cc0be98f1d49b03abca094a9785ad1e50c20e7634b1"
|
||||
},
|
||||
"1414545": {
|
||||
"height": 1414545,
|
||||
"hash": "0000000000035fd65c471e0645190d5392de4dc626358bc001c753ade3b8a44c"
|
||||
},
|
||||
"1414546": {
|
||||
"height": 1414546,
|
||||
"hash": "000000000003b4360cebb2c29d7798c22ae31b8ba83941ebed0c61fb56beb765"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"1414544": {
|
||||
"height": 1414544,
|
||||
"hash": "0000000000012b55c84faf61e201a1c64c6a57e8be3d2b5e11868c39cab5027e"
|
||||
},
|
||||
"1414545": {
|
||||
"height": 1414545,
|
||||
"hash": "0000000017020556bdeac9d3bbd2361d11aba79ac39f8a161170ac22d225856d"
|
||||
},
|
||||
"1414546": {
|
||||
"height": 1414546,
|
||||
"hash": "0000000000000000b169d17aee62e9f5758a38c7bead2676fc4e4a22a51f17b9"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
165
tests/sync/testdata/bitcore.json
vendored
165
tests/sync/testdata/bitcore.json
vendored
@ -1,165 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 322212, "upper": 322232}
|
||||
],
|
||||
"blocks": {
|
||||
"322230": {
|
||||
"height": 322230,
|
||||
"hash": "7c5a032930a9e0250cc976a70cbc633b440e569f45b53c77b2c1ad3438430add",
|
||||
"noTxs": 3,
|
||||
"txDetails": [
|
||||
{
|
||||
"txid": "54d2eacdd9aa1f91e9829dbbbfa1a9a9cb3dda75d5f7e134accccdf1c5b4b53c",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "36ca6b110a6e96c302e5d93d5ba7547e902a42d614e3e365cc0049dcb6f2cd06",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100dbfc804b9fddb122b0b85e126786ce4be8bdec7cc74ae5c559ff47005947af5b02201d06c5bb13127170ee4002f28048f216c7b07359eec87c7c5d893ee709c2aff60121026c05efaacc255d07782f83d1b7ce948ecbf406adf0ff95454daa21a7ed2eaa62"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 549.9939726,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9143bb26a2427f9790ff0e7afdecd3460cf59aa81d688ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 50.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914bb36447fe1acc280e0304d00cf25772413b9954d88ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "020000000106cdf2b6dc4900cc65e3e314d6422a907e54a75b3dd9e502c3966e0a116bca36010000006b483045022100dbfc804b9fddb122b0b85e126786ce4be8bdec7cc74ae5c559ff47005947af5b02201d06c5bb13127170ee4002f28048f216c7b07359eec87c7c5d893ee709c2aff60121026c05efaacc255d07782f83d1b7ce948ecbf406adf0ff95454daa21a7ed2eaa62feffffff028c3338ce0c0000001976a9143bb26a2427f9790ff0e7afdecd3460cf59aa81d688ac00f2052a010000001976a914bb36447fe1acc280e0304d00cf25772413b9954d88acb5ea0400",
|
||||
"time": 1547300769,
|
||||
"blocktime": 1547300769
|
||||
},
|
||||
{
|
||||
"txid": "2506225de845f0a4078987c1aab115b6f08eaa6d08f76be0aa61ce9a3a86eabc",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "fbb10919a1cca68bafe4a2a9a09cd23e00231d84d0e6c010f31c962250921751",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "4830450221009afeedd0eed56bd6bd2c1e361b811ce094659ca178a401af3e0aeae23748a66802206f29e6f7961f0e13bb5626d7c2393ead75642091187aa5c454427a7f4b2d9d1d012103bf507caf97b107e35ba894bd51fe677a5f4dd7a9523d54d58d622604e7a0099c"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 299.99729859,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914cbd6c5e94d9ce8520ba81f32c74e02fc0b36c98588ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 50.00000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914bb36447fe1acc280e0304d00cf25772413b9954d88ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "02000000015117925022961cf310c0e6d0841d23003ed29ca0a9a2e4af8ba6cca11909b1fb010000006b4830450221009afeedd0eed56bd6bd2c1e361b811ce094659ca178a401af3e0aeae23748a66802206f29e6f7961f0e13bb5626d7c2393ead75642091187aa5c454427a7f4b2d9d1d012103bf507caf97b107e35ba894bd51fe677a5f4dd7a9523d54d58d622604e7a0099cfeffffff02c38c1ffc060000001976a914cbd6c5e94d9ce8520ba81f32c74e02fc0b36c98588ac00f2052a010000001976a914bb36447fe1acc280e0304d00cf25772413b9954d88acb5ea0400",
|
||||
"blockhash": "7c5a032930a9e0250cc976a70cbc633b440e569f45b53c77b2c1ad3438430add",
|
||||
"confirmations": 4126,
|
||||
"time": 1547300769,
|
||||
"blocktime": 1547300769
|
||||
}
|
||||
]
|
||||
},
|
||||
"322214": {
|
||||
"height": 322214,
|
||||
"hash": "4ef7b0e81593fe596d2007755b7b9536a650367cd2faac20c109fe59692435e7",
|
||||
"noTxs": 4,
|
||||
"txDetails": [
|
||||
{
|
||||
"txid": "7dc1059cb5824758a256c0e637e7282a97557b77d1d19c0862e3c909d48a3235",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "a6793b708e5b8fb0d4ac641e20f5f6ede4528c70946a64121459aad446d7c5c3",
|
||||
"vout": 0,
|
||||
"scriptSig": {
|
||||
"hex": "47304402206951c77f111798349509b29ac05f0b4b12e31b08a5af63dbee53736ddbe4144a02205c8049556deadd2452e0cd0ac418402a641b9b94bae2a4d41e04ac755c658afd012102d9b6098eacbb5a58f984c76d75c99b6bfc0fae73590f946a6a4c2634acf8cc8e"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
},
|
||||
{
|
||||
"txid": "5a1bdefc5a4f9b7074ae46893a2d8e908ecad01986519ffe7b8c97de489f33d9",
|
||||
"vout": 1,
|
||||
"scriptSig": {
|
||||
"hex": "4730440220705673f1cbf506177ae65dafe87083df2aefc8f3652bfe367031252d41897a810220554082d80ed46c1f831cb33c50aaf9390b0c83f4a02955b3048958cb2a9f36cd012102532ad08c8e2084f3a4811fac622dff01dded81ee3ef200d3e7efbccce1f52d60"
|
||||
},
|
||||
"sequence": 4294967294
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 3.12682838,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914ff65ae5ed06457a560130eb33befb79b7240807888ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.01459703,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914cff0d08dd8853b20d0ecefa3a48452157a54e1ac88ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex": "0200000002c3c5d746d4aa591412646a94708c52e4edf6f5201e64acd4b08f5b8e703b79a6000000006a47304402206951c77f111798349509b29ac05f0b4b12e31b08a5af63dbee53736ddbe4144a02205c8049556deadd2452e0cd0ac418402a641b9b94bae2a4d41e04ac755c658afd012102d9b6098eacbb5a58f984c76d75c99b6bfc0fae73590f946a6a4c2634acf8cc8efeffffffd9339f48de978c7bfe9f518619d0ca8e908e2d3a8946ae74709b4f5afcde1b5a010000006a4730440220705673f1cbf506177ae65dafe87083df2aefc8f3652bfe367031252d41897a810220554082d80ed46c1f831cb33c50aaf9390b0c83f4a02955b3048958cb2a9f36cd012102532ad08c8e2084f3a4811fac622dff01dded81ee3ef200d3e7efbccce1f52d60feffffff025629a312000000001976a914ff65ae5ed06457a560130eb33befb79b7240807888acf7451600000000001976a914cff0d08dd8853b20d0ecefa3a48452157a54e1ac88aca5ea0400",
|
||||
"time": 1547296216,
|
||||
"blocktime": 1547296216
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 322225, "upper": 322232}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"322230": {
|
||||
"height": 322230,
|
||||
"hash": "39918a9e2be1ee0b67b0cdee18d5fa23c24e8770c19a2deeaf9782eb8d2e3803"
|
||||
},
|
||||
"322231": {
|
||||
"height": 322231,
|
||||
"hash": "6f796caa1d61b44e4c149a12b7ba9fa11db58293642f620bf94c96a39667d7ba"
|
||||
},
|
||||
"322232": {
|
||||
"height": 322232,
|
||||
"hash": "d41f4d45ba4bb1659674932183de4f9a26bfcf0df484e3fd70e75a475b85d038"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"322230": {
|
||||
"height": 322230,
|
||||
"hash": "7c5a032930a9e0250cc976a70cbc633b440e569f45b53c77b2c1ad3438430add"
|
||||
},
|
||||
"322231": {
|
||||
"height": 322231,
|
||||
"hash": "a737e20511e55fe6b696475cc8c5ce43acb6bff49ce8eb09bf838bcdd0f49ccd"
|
||||
},
|
||||
"322232": {
|
||||
"height": 322232,
|
||||
"hash": "7c3a4671c8faf59b35fcaa91a33a9e24cd24714b22e40c2b8e3e3c82410c991d"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
90
tests/sync/testdata/bitzeny.json
vendored
90
tests/sync/testdata/bitzeny.json
vendored
@ -1,90 +0,0 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 1851157, "upper": 1851162}
|
||||
],
|
||||
"blocks": {
|
||||
"1851162": {
|
||||
"height": 1851162,
|
||||
"hash": "0000000050a2ab1816b07e63ee9faf8cefbb44a65192e1c5a7360c41efd1d1ef",
|
||||
"noTxs": 2,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "0100000001aef422fb91cd91e556966fed4121ac44017a761d71385596536bb447ae05213e000000006a47304402202341ac4297925257dc72eb418a069c45e76f7070340e27501f6308cc7eff45f802204a347915adceff5f6fc9b8075d95d47887d46b344c7bbc8066d315931b189ad001210228c2520812b7f8c63e7a088c61b6348b22fa0c98812e736a1fd896bc828d3c65feffffff028041f13d000000001976a91478379ea136bb5783b675cd11e412bf0703995aeb88aca9983141000000001976a9144d869697281ad18370313122795e56dfdc3a331388ac193f1c00",
|
||||
"txid": "f81c34b300961877328c3aaa7cd5e69068457868309fbf1e92544e3a6a915bcb",
|
||||
"version": 1,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "3e2105ae47b46b53965538711d767a0144ac2141ed6f9656e591cd91fb22f4ae",
|
||||
"vout": 0,
|
||||
"sequence": 4294967294,
|
||||
"scriptSig": {
|
||||
"hex": "47304402202341ac4297925257dc72eb418a069c45e76f7070340e27501f6308cc7eff45f802204a347915adceff5f6fc9b8075d95d47887d46b344c7bbc8066d315931b189ad001210228c2520812b7f8c63e7a088c61b6348b22fa0c98812e736a1fd896bc828d3c65"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 10.39221120,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a91478379ea136bb5783b675cd11e412bf0703995aeb88ac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 10.93769385,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a9144d869697281ad18370313122795e56dfdc3a331388ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1583392607,
|
||||
"blocktime": 1583392607
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 1851157, "upper": 1851162}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"1851159": {
|
||||
"height": 1851159,
|
||||
"hash": "0000000954c26c65b18f72bd3e09d21033b7bb5e5083834912c12ebd27a487a1"
|
||||
},
|
||||
"1851160": {
|
||||
"height": 1851160,
|
||||
"hash": "0000001246c307c2c82e4186f48db5e3a8a3ce7d10247b904ecef36ed857aaa5"
|
||||
},
|
||||
"1851161": {
|
||||
"height": 1851161,
|
||||
"hash": "0000000c6a16db38d0c8ccf070b67933a95d7a89bea070df19d129403164c937"
|
||||
},
|
||||
"1851162": {
|
||||
"height": 1851162,
|
||||
"hash": "0000000983707dadd92795f29427ea403bb08eb7f58e5a005ee4389c0a3bb4f5"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"1851159": {
|
||||
"height": 1851159,
|
||||
"hash": "000000044e0aafd95fc2a7fa9ae55907c8995efa210bc323001e1369e6c2c36c"
|
||||
},
|
||||
"1851160": {
|
||||
"height": 1851160,
|
||||
"hash": "0000000de74eea08d48f9a3235036aee30d3acf0ab2c2c6a6a58d1d3331b75ac"
|
||||
},
|
||||
"1851161": {
|
||||
"height": 1851161,
|
||||
"hash": "000000157556e42684a33a917e5c64217fa33162ccf30167e28577d47dbecc2d"
|
||||
},
|
||||
"1851162": {
|
||||
"height": 1851162,
|
||||
"hash": "0000000050a2ab1816b07e63ee9faf8cefbb44a65192e1c5a7360c41efd1d1ef"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user