Add VIPSTARCOIN
This commit is contained in:
parent
32885e54e7
commit
70ace81011
@ -26,6 +26,7 @@ import (
|
||||
"blockbook/bchain/coins/qtum"
|
||||
"blockbook/bchain/coins/vertcoin"
|
||||
"blockbook/bchain/coins/viacoin"
|
||||
"blockbook/bchain/coins/vipstarcoin"
|
||||
"blockbook/bchain/coins/xzc"
|
||||
"blockbook/bchain/coins/zec"
|
||||
"blockbook/common"
|
||||
@ -85,6 +86,7 @@ func init() {
|
||||
BlockChainFactories["Viacoin"] = viacoin.NewViacoinRPC
|
||||
BlockChainFactories["Qtum Testnet"] = qtum.NewQtumRPC
|
||||
BlockChainFactories["NULS"] = nuls.NewNulsRPC
|
||||
BlockChainFactories["VIPSTARCOIN"] = viacoin.NewViacoinRPC
|
||||
}
|
||||
|
||||
// GetCoinNameFromConfig gets coin name and coin shortcut from config file
|
||||
|
||||
62
bchain/coins/vipstarcoin/vipstarcoinparser.go
Normal file
62
bchain/coins/vipstarcoin/vipstarcoinparser.go
Normal file
@ -0,0 +1,62 @@
|
||||
package vipstarcoin
|
||||
|
||||
import (
|
||||
"blockbook/bchain/coins/btc"
|
||||
|
||||
"github.com/martinboehm/btcd/wire"
|
||||
"github.com/martinboehm/btcutil/chaincfg"
|
||||
)
|
||||
|
||||
const (
|
||||
MainnetMagic wire.BitcoinNet = 0x012ce7b5
|
||||
TestnetMagic wire.BitcoinNet = 0x1a2b3c4d
|
||||
)
|
||||
|
||||
var (
|
||||
MainNetParams chaincfg.Params
|
||||
TestNetParams chaincfg.Params
|
||||
)
|
||||
|
||||
func init() {
|
||||
MainNetParams = chaincfg.MainNetParams
|
||||
MainNetParams.Net = MainnetMagic
|
||||
MainNetParams.PubKeyHashAddrID = []byte{70}
|
||||
MainNetParams.ScriptHashAddrID = []byte{50}
|
||||
MainNetParams.Bech32HRPSegwit = "vips"
|
||||
|
||||
TestNetParams = chaincfg.TestNet3Params
|
||||
TestNetParams.Net = TestnetMagic
|
||||
TestNetParams.PubKeyHashAddrID = []byte{132}
|
||||
TestNetParams.ScriptHashAddrID = []byte{110}
|
||||
TestNetParams.Bech32HRPSegwit = "tvips"
|
||||
}
|
||||
|
||||
// VIPSTARCOINParser handle
|
||||
type VIPSTARCOINParser struct {
|
||||
*btc.BitcoinParser
|
||||
}
|
||||
|
||||
// NewVIPSTARCOINParser returns new VIPSTARCOINParser instance
|
||||
func NewVIPSTARCOINParser(params *chaincfg.Params, c *btc.Configuration) *VIPSTARCOINParser {
|
||||
return &VIPSTARCOINParser{BitcoinParser: btc.NewBitcoinParser(params, c)}
|
||||
}
|
||||
|
||||
// GetChainParams contains network parameters for the main VIPSTARCOIN network,
|
||||
// and the test VIPSTARCOIN network
|
||||
func GetChainParams(chain string) *chaincfg.Params {
|
||||
if !chaincfg.IsRegistered(&MainNetParams) {
|
||||
err := chaincfg.Register(&MainNetParams)
|
||||
if err == nil {
|
||||
err = chaincfg.Register(&TestNetParams)
|
||||
}
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
switch chain {
|
||||
case "test":
|
||||
return &TestNetParams
|
||||
default:
|
||||
return &MainNetParams
|
||||
}
|
||||
}
|
||||
305
bchain/coins/vipstarcoin/vipstarcoinparser_test.go
Normal file
305
bchain/coins/vipstarcoin/vipstarcoinparser_test.go
Normal file
@ -0,0 +1,305 @@
|
||||
// +build unittest
|
||||
|
||||
package vipstarcoin
|
||||
|
||||
import (
|
||||
"blockbook/bchain"
|
||||
"blockbook/bchain/coins/btc"
|
||||
"encoding/hex"
|
||||
"math/big"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/martinboehm/btcutil/chaincfg"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
c := m.Run()
|
||||
chaincfg.ResetParams()
|
||||
os.Exit(c)
|
||||
}
|
||||
|
||||
func Test_GetAddrDescFromAddress_Mainnet(t *testing.T) {
|
||||
type args struct {
|
||||
address string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "P2PKH1",
|
||||
args: args{address: "VLhjpFadC3pkyydKfMTbdg6JFaYojkubik"},
|
||||
want: "76a9146e2b0a8655786c8c5ea7b9ce478f03e00ecb2f5588ac",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2PKH2",
|
||||
args: args{address: "VEUMnC1iPpr64u4HwE9DRjhwnF98xbS6n4"},
|
||||
want: "76a91429d27c0c33c87830dda711aa878574bcd9c5247188ac",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2SH1",
|
||||
args: args{address: "MAyVr99hsthBJin9sosjdyfeAP3ByxXFxz"},
|
||||
want: "a91421ba6a62ac1d74d2ba921bbc8c9a3ca6e1420a0087",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2SH2",
|
||||
args: args{address: "MV71zj5jJ1b9ijt198JAJrCwDHxu3tCn6g"},
|
||||
want: "a914e898c1f90c736de7c3570c3391bf5e726c8b59aa87",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2WPKH",
|
||||
args: args{address: "vips1q0v3tadxj6pm3ym9j06v9rfyw0jeh5f8s87sgtw"},
|
||||
want: "00147b22beb4d2d077126cb27e9851a48e7cb37a24f0",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2WSH",
|
||||
args: args{address: "vips1qumpyvyxz25kfjjrvyxn3zlyc2wfc0m3l3gm5pg99c4mxylemfqhsnj023l"},
|
||||
want: "0020e6c24610c2552c99486c21a7117c98539387ee3f8a3740a0a5c576627f3b482f",
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
parser := NewVIPSTARCOINParser(GetChainParams("main"), &btc.Configuration{})
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := parser.GetAddrDescFromAddress(tt.args.address)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("GetAddrDescFromAddress() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
h := hex.EncodeToString(got)
|
||||
if !reflect.DeepEqual(h, tt.want) {
|
||||
t.Errorf("GetAddrDescFromAddress() = %v, want %v", h, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GetAddressesFromAddrDesc(t *testing.T) {
|
||||
type args struct {
|
||||
script string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want []string
|
||||
want2 bool
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "P2PKH",
|
||||
args: args{script: "76a9146e2b0a8655786c8c5ea7b9ce478f03e00ecb2f5588ac"},
|
||||
want: []string{"VLhjpFadC3pkyydKfMTbdg6JFaYojkubik"},
|
||||
want2: true,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2SH",
|
||||
args: args{script: "a91421ba6a62ac1d74d2ba921bbc8c9a3ca6e1420a0087"},
|
||||
want: []string{"MAyVr99hsthBJin9sosjdyfeAP3ByxXFxz"},
|
||||
want2: true,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2WPKH",
|
||||
args: args{script: "00147b22beb4d2d077126cb27e9851a48e7cb37a24f0"},
|
||||
want: []string{"vips1q0v3tadxj6pm3ym9j06v9rfyw0jeh5f8s87sgtw"},
|
||||
want2: true,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "P2WSH",
|
||||
args: args{script: "0020e6c24610c2552c99486c21a7117c98539387ee3f8a3740a0a5c576627f3b482f"},
|
||||
want: []string{"vips1qumpyvyxz25kfjjrvyxn3zlyc2wfc0m3l3gm5pg99c4mxylemfqhsnj023l"},
|
||||
want2: true,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "OP_RETURN ascii",
|
||||
args: args{script: "6a0461686f6a"},
|
||||
want: []string{"OP_RETURN (ahoj)"},
|
||||
want2: false,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "OP_RETURN hex",
|
||||
args: args{script: "6a072020f1686f6a20"},
|
||||
want: []string{"OP_RETURN 2020f1686f6a20"},
|
||||
want2: false,
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
|
||||
parser := NewVIPSTARCOINParser(GetChainParams("main"), &btc.Configuration{})
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
b, _ := hex.DecodeString(tt.args.script)
|
||||
got, got2, err := parser.GetAddressesFromAddrDesc(b)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("outputScriptToAddresses() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("GetAddressesFromAddrDesc() = %v, want %v", got, tt.want)
|
||||
}
|
||||
if !reflect.DeepEqual(got2, tt.want2) {
|
||||
t.Errorf("GetAddressesFromAddrDesc() = %v, want %v", got2, tt.want2)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
testTx1 bchain.Tx
|
||||
|
||||
testTxPacked1 = ""
|
||||
)
|
||||
|
||||
func init() {
|
||||
testTx1 = bchain.Tx{
|
||||
Hex: "02000000000103a733281698ae7d80da17d5a201ab8b6077e83f780cb417c8d12eb9da8343735900000000171600141ee6fc3b04fdd080c03eeb513498b38c2621f4fcfdffffff3976295b67ed10a28016171da4f9a5833fe4ca1f83ffb56f95856aa445ebf46a000000006a473044022012315ff56ad254ed8b099623bd84a106819770970c41c2a138b6cfe4bb332aa602206f5679570c968b77a3f7e8dd14663d0af9aba5b354f113d3a4321b3aeafc03080121030d52fc12b11b9288490ed78b8b07ff025a33fe1577f402ddf30c0f73769363a3fdffffffdd5a7a9852c8ebe1c417a26c54bb58339eb6e1ea1416b9b11314f05f93e69ea1010000006a4730440220149942b3971fb655bd5d76630bb1c8993d3083e4ad631c972156927173e6afb802204590399049f77530251c86ab569f45d2248aa222372b9d1d95963bd67213a5f80121030d52fc12b11b9288490ed78b8b07ff025a33fe1577f402ddf30c0f73769363a3fdffffff0200ca9a3b000000001976a91493c052c292e366221f9ee709c36a9ea441eb984488acb0b20e000000000017a9149695605a5a5e9349e1c99e01b175c5c3baf39bc4870247304402207a2a1cc2f314c8c659a4bcbce099c5adfb217c03fa2b0cfc95bef48c1507901a0220324ab06cf2fe4c9e446a3a12c00fa611a479b5734f62c20b66e919e173a2c699012102bbe6f37b4c44303b2186de6784d02cc5b86a65ca1203821b06a98e243b44c76400004e310800",
|
||||
Blocktime: 1555835824,
|
||||
Txid: "93aae65e87ec46cd13b3032e1588c7db75e2b712514696efca5f2bfd80c16632",
|
||||
LockTime: 536910,
|
||||
Version: 2,
|
||||
Vin: []bchain.Vin{
|
||||
{
|
||||
ScriptSig: bchain.ScriptSig{
|
||||
Hex: "1600141ee6fc3b04fdd080c03eeb513498b38c2621f4fc",
|
||||
},
|
||||
Txid: "59734383dab92ed1c817b40c783fe877608bab01a2d517da807dae98162833a7",
|
||||
Vout: 0,
|
||||
Sequence: 4294967293,
|
||||
},
|
||||
{
|
||||
ScriptSig: bchain.ScriptSig{
|
||||
Hex: "473044022012315ff56ad254ed8b099623bd84a106819770970c41c2a138b6cfe4bb332aa602206f5679570c968b77a3f7e8dd14663d0af9aba5b354f113d3a4321b3aeafc03080121030d52fc12b11b9288490ed78b8b07ff025a33fe1577f402ddf30c0f73769363a3",
|
||||
},
|
||||
Txid: "6af4eb45a46a85956fb5ff831fcae43f83a5f9a41d171680a210ed675b297639",
|
||||
Vout: 1,
|
||||
Sequence: 4294967293,
|
||||
},
|
||||
{
|
||||
ScriptSig: bchain.ScriptSig{
|
||||
Hex: "4730440220149942b3971fb655bd5d76630bb1c8993d3083e4ad631c972156927173e6afb802204590399049f77530251c86ab569f45d2248aa222372b9d1d95963bd67213a5f80121030d52fc12b11b9288490ed78b8b07ff025a33fe1577f402ddf30c0f73769363a3",
|
||||
},
|
||||
Txid: "a19ee6935ff01413b1b91614eae1b69e3358bb546ca217c4e1ebc852987a5add",
|
||||
Vout: 1,
|
||||
Sequence: 4294967293,
|
||||
},
|
||||
},
|
||||
Vout: []bchain.Vout{
|
||||
{
|
||||
ValueSat: *big.NewInt(1000000000),
|
||||
N: 0,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: "76a91493c052c292e366221f9ee709c36a9ea441eb984488ac",
|
||||
Addresses: []string{
|
||||
"VQ8Tef3y1hKQnAq5baiyxiScsVnEcPqjdy",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ValueSat: *big.NewInt(963248),
|
||||
N: 1,
|
||||
ScriptPubKey: bchain.ScriptPubKey{
|
||||
Hex: "a9149695605a5a5e9349e1c99e01b175c5c3baf39bc487",
|
||||
Addresses: []string{
|
||||
"MMdNY4HfcntfZ1EB6zn5Zz7i25yYfocaFT",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func Test_PackTx(t *testing.T) {
|
||||
type args struct {
|
||||
tx bchain.Tx
|
||||
height uint32
|
||||
blockTime int64
|
||||
parser *VIPSTARCOINParser
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "VIPSTARCOIN-1",
|
||||
args: args{
|
||||
tx: testTx1,
|
||||
height: 536912,
|
||||
blockTime: 1555835824,
|
||||
parser: NewVIPSTARCOINParser(GetChainParams("main"), &btc.Configuration{}),
|
||||
},
|
||||
want: testTxPacked1,
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := tt.args.parser.PackTx(&tt.args.tx, tt.args.height, tt.args.blockTime)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("packTx() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
h := hex.EncodeToString(got)
|
||||
if !reflect.DeepEqual(h, tt.want) {
|
||||
t.Errorf("packTx() = %v, want %v", h, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_UnpackTx(t *testing.T) {
|
||||
type args struct {
|
||||
packedTx string
|
||||
parser *VIPSTARCOINParser
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *bchain.Tx
|
||||
want1 uint32
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "VIPSTARCOIN-1",
|
||||
args: args{
|
||||
packedTx: testTxPacked1,
|
||||
parser: NewVIPSTARCOINParser(GetChainParams("main"), &btc.Configuration{}),
|
||||
},
|
||||
want: &testTx1,
|
||||
want1: 536912,
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
b, _ := hex.DecodeString(tt.args.packedTx)
|
||||
got, got1, err := tt.args.parser.UnpackTx(b)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("unpackTx() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("unpackTx() got = %v, want %v", got, tt.want)
|
||||
}
|
||||
if got1 != tt.want1 {
|
||||
t.Errorf("unpackTx() got1 = %v, want %v", got1, tt.want1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
58
bchain/coins/vipstarcoin/vipstarcoinrpc.go
Normal file
58
bchain/coins/vipstarcoin/vipstarcoinrpc.go
Normal file
@ -0,0 +1,58 @@
|
||||
package vipstarcoin
|
||||
|
||||
import (
|
||||
"blockbook/bchain"
|
||||
"blockbook/bchain/coins/btc"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// VIPSTARCOINRPC is an interface to JSON-RPC bitcoind service.
|
||||
type VIPSTARCOINRPC struct {
|
||||
*btc.BitcoinRPC
|
||||
}
|
||||
|
||||
// NewVIPSTARCOINRPC returns new VIPSTARCOINRPC instance.
|
||||
func NewVIPSTARCOINRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error) {
|
||||
b, err := btc.NewBitcoinRPC(config, pushHandler)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s := &VIPSTARCOINRPC{
|
||||
b.(*btc.BitcoinRPC),
|
||||
}
|
||||
s.RPCMarshaler = btc.JSONMarshalerV2{}
|
||||
s.ChainConfig.SupportsEstimateFee = false
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// Initialize initializes VIPSTARCOINRPC instance.
|
||||
func (b *VIPSTARCOINRPC) Initialize() error {
|
||||
ci, err := b.GetChainInfo()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
chainName := ci.Chain
|
||||
|
||||
glog.Info("Chain name ", chainName)
|
||||
params := GetChainParams(chainName)
|
||||
|
||||
// always create parser
|
||||
b.Parser = NewVIPSTARCOINParser(params, b.ChainConfig)
|
||||
|
||||
// parameters for getInfo request
|
||||
if params.Net == MainnetMagic {
|
||||
b.Testnet = false
|
||||
b.Network = "livenet"
|
||||
} else {
|
||||
b.Testnet = true
|
||||
b.Network = "testnet"
|
||||
}
|
||||
|
||||
glog.Info("rpc: block chain ", params.Name)
|
||||
|
||||
return nil
|
||||
}
|
||||
66
configs/coins/vipstarcoin.json
Normal file
66
configs/coins/vipstarcoin.json
Normal file
@ -0,0 +1,66 @@
|
||||
{
|
||||
"coin": {
|
||||
"name": "VIPSTARCOIN",
|
||||
"shortcut": "VIPS",
|
||||
"label": "VIPSTARCOIN",
|
||||
"alias": "VIPSTARCOIN"
|
||||
},
|
||||
"ports": {
|
||||
"backend_rpc": 8090,
|
||||
"backend_message_queue": 38390,
|
||||
"blockbook_internal": 9090,
|
||||
"blockbook_public": 9190
|
||||
},
|
||||
"ipc": {
|
||||
"rpc_url_template": "http://127.0.0.1:{{.Ports.BackendRPC}}",
|
||||
"rpc_user": "rpc",
|
||||
"rpc_pass": "rpc",
|
||||
"rpc_timeout": 25,
|
||||
"message_queue_binding_template": "tcp://127.0.0.1:{{.Ports.BackendMessageQueue}}"
|
||||
},
|
||||
"backend": {
|
||||
"package_name": "backend-vipstarcoin",
|
||||
"package_revision": "satoshilabs-1",
|
||||
"system_user": "bellcoin",
|
||||
"version": "1.0.2",
|
||||
"binary_url": "https://github.com/y-chan/VIPSTARCOIN/releases/download/v1.0.2/VIPSTARCOIN-1.0.2-x86_64-linux-gnu.tar.gz",
|
||||
"verification_type": "sha256",
|
||||
"verification_source": "0bb608cf9103a896f2c1bf7f189db78f717019c2cc622f36581129876c65f131",
|
||||
"extract_command": "tar -C backend --strip 1 -xf",
|
||||
"exclude_files": [
|
||||
"bin/VIPSTARCOIN-qt"
|
||||
],
|
||||
"exec_command_template": "{{.Env.BackendInstallPath}}/{{.Coin.Alias}}/VIPSTARCOINd -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",
|
||||
"service_additional_params_template": "",
|
||||
"protect_memory": true,
|
||||
"mainnet": true,
|
||||
"server_config_file": "bitcoin_like.conf",
|
||||
"client_config_file": "bitcoin_like_client.conf",
|
||||
"additional_params": {
|
||||
"whitelist": "127.0.0.1"
|
||||
}
|
||||
},
|
||||
"blockbook": {
|
||||
"package_name": "blockbook-vipstarcoin",
|
||||
"system_user": "blockbook-vipstarcoin",
|
||||
"internal_binding_template": ":{{.Ports.BlockbookInternal}}",
|
||||
"public_binding_template": ":{{.Ports.BlockbookPublic}}",
|
||||
"explorer_url": "",
|
||||
"additional_params": "",
|
||||
"block_chain": {
|
||||
"parse": true,
|
||||
"mempool_workers": 8,
|
||||
"mempool_sub_workers": 2,
|
||||
"block_addresses_to_keep": 300,
|
||||
"slip44": 1919,
|
||||
"additional_params": {}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"package_maintainer": "y-chan",
|
||||
"package_maintainer_email": "yuto_tetuota@yahoo.co.jp"
|
||||
}
|
||||
}
|
||||
@ -30,6 +30,7 @@
|
||||
| Flo | 9066 | 9166 | 8066 | 38366 |
|
||||
| Polis | 9067 | 9167 | 8067 | 38367 |
|
||||
| Qtum | 9088 | 9188 | 8088 | 38388 |
|
||||
| Monacoin | 9090 | 9190 | 8090 | 38390 |
|
||||
| Bitcoin Testnet | 19030 | 19130 | 18030 | 48330 |
|
||||
| Bitcoin Cash Testnet | 19031 | 19131 | 18031 | 48331 |
|
||||
| Zcash Testnet | 19032 | 19132 | 18032 | 48332 |
|
||||
|
||||
53
tests/rpc/testdata/vipstarcoin.json
vendored
Normal file
53
tests/rpc/testdata/vipstarcoin.json
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
104
tests/sync/testdata/vipstarcoin.json
vendored
Normal file
104
tests/sync/testdata/vipstarcoin.json
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
{
|
||||
"connectBlocks": {
|
||||
"syncRanges": [
|
||||
{"lower": 538519, "upper": 538539}
|
||||
],
|
||||
"blocks": {
|
||||
"538539": {
|
||||
"height": 538539,
|
||||
"hash": "7f0cf13f99d7c96c0f2334433516e5d3621b34f60d76ee9dc98698b855a319fd",
|
||||
"noTxs": 3,
|
||||
"txDetails": [
|
||||
{
|
||||
"hex": "0200000001ceebca2fcfb99dcd667d795a99badc9dd37fb5c4738e6d137ed5126b444479b70100000049483045022100e6ebe75139a56532c0795a10f3457e5f9b05b8a625cd36abfa27688a236882e602207fbbaf6045761ba67af3107e4e557a62309067f32a02183d846e16bfac81b6eb01ffffffff040000000000000000008062f92dda160000232103069114b4f300ed8836a5ff75054a4a3a2bc21e0b51ea4d1f41f7e61f51472dadacc01c132eda160000232103069114b4f300ed8836a5ff75054a4a3a2bc21e0b51ea4d1f41f7e61f51472dadac80769000000000001976a914b5749d2f105a91593b956a121fcf94e59278d56288ac00000000",
|
||||
"txid": "5ac7264773b2e44648e0861e1d19e3a727824ac9ad1cc2030710c62ad6cd53a1",
|
||||
"version": 2,
|
||||
"vin": [
|
||||
{
|
||||
"txid": "b77944446b12d57e136d8e73c4b57fd39ddcba995a797d66cd9db9cf2fcaebce",
|
||||
"vout": 1,
|
||||
"sequence": 4294967295,
|
||||
"scriptSig": {
|
||||
"hex": "483045022100e6ebe75139a56532c0795a10f3457e5f9b05b8a625cd36abfa27688a236882e602207fbbaf6045761ba67af3107e4e557a62309067f32a02183d846e16bfac81b6eb01"
|
||||
}
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.00000000,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"hex": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 251263.30000000,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"hex": "2103069114b4f300ed8836a5ff75054a4a3a2bc21e0b51ea4d1f41f7e61f51472dadac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 251263.31686080,
|
||||
"n": 2,
|
||||
"scriptPubKey": {
|
||||
"hex": "2103069114b4f300ed8836a5ff75054a4a3a2bc21e0b51ea4d1f41f7e61f51472dadac"
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.09467520,
|
||||
"n": 3,
|
||||
"scriptPubKey": {
|
||||
"hex": "76a914b5749d2f105a91593b956a121fcf94e59278d56288ac"
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": 1555935872,
|
||||
"blocktime": 1555935872
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"handleFork": {
|
||||
"syncRanges": [
|
||||
{"lower": 538519, "upper": 538539}
|
||||
],
|
||||
"fakeBlocks": {
|
||||
"538536": {
|
||||
"height": 538536,
|
||||
"hash": "00000000000389fc8b2989ae94a083ad6091cd9cfd9bc92ad02989e2a940e49b"
|
||||
},
|
||||
"538537": {
|
||||
"height": 538537,
|
||||
"hash": "7ef85808d790718fdf0e12e056f7bb4e1fa5f5ff2dd2f45878c07cc7f2199e81"
|
||||
},
|
||||
"538538": {
|
||||
"height": 538538,
|
||||
"hash": "0000000000235d6c42a23810896a078e2fb41850cad11fd003a9d412eb1487d3"
|
||||
},
|
||||
"538539": {
|
||||
"height": 538539,
|
||||
"hash": "cede97c7d51795621b2839d745c291b8853eb064c037a00c3edbbf9d754cc600"
|
||||
}
|
||||
},
|
||||
"realBlocks": {
|
||||
"538536": {
|
||||
"height": 538536,
|
||||
"hash": "434ad83e19ccaa4fe769559b7f98564b5cfb30f72819a003372394633b01368a"
|
||||
},
|
||||
"538537": {
|
||||
"height": 538537,
|
||||
"hash": "1fe91c1b068f202158517249463e19d297a7d89ad1db4011c70cf6e89123b39f"
|
||||
},
|
||||
"538538": {
|
||||
"height": 538538,
|
||||
"hash": "0000000000ad20d8225f83a4572a20129fcb186de3b2733b6ce0a46dd17c0c74"
|
||||
},
|
||||
"538539": {
|
||||
"height": 538539,
|
||||
"hash": "7f0cf13f99d7c96c0f2334433516e5d3621b34f60d76ee9dc98698b855a319fd"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -140,5 +140,10 @@
|
||||
"nuls": {
|
||||
"rpc": ["GetBlock", "GetBlockHash", "GetTransaction", "GetBestBlockHash", "GetBestBlockHeight", "GetBlockHeader"],
|
||||
"sync": ["ConnectBlocksParallel", "ConnectBlocks", "HandleFork"]
|
||||
}
|
||||
},
|
||||
"vipstarcoin": {
|
||||
"rpc": ["GetBlock", "GetBlockHash", "GetTransaction", "GetTransactionForMempool", "MempoolSync",
|
||||
"EstimateSmartFee", "EstimateFee", "GetBestBlockHash", "GetBestBlockHeight", "GetBlockHeader"],
|
||||
"sync": ["ConnectBlocksParallel", "ConnectBlocks", "HandleFork"]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user