Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
eaaeeb54
Commit
eaaeeb54
authored
Dec 19, 2018
by
vipwzw
Committed by
33cn
Dec 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update chain33
parent
60e4efbc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
305 additions
and
50 deletions
+305
-50
init.go
plugin/consensus/init/init.go
+0
-8
init.go
plugin/crypto/init/init.go
+0
-5
init.go
plugin/dapp/init/init.go
+0
-21
init.go
plugin/store/init/init.go
+0
-6
.travis.yml
vendor/github.com/33cn/chain33/.travis.yml
+5
-5
db.go
vendor/github.com/33cn/chain33/common/db/db.go
+1
-2
db_test.go
vendor/github.com/33cn/chain33/common/db/db_test.go
+24
-0
go_level_db_test.go
vendor/github.com/33cn/chain33/common/db/go_level_db_test.go
+12
-0
list_helper.go
vendor/github.com/33cn/chain33/common/db/list_helper.go
+0
-1
count.go
vendor/github.com/33cn/chain33/common/db/table/count.go
+93
-0
count_test.go
vendor/github.com/33cn/chain33/common/db/table/count_test.go
+36
-0
error.go
vendor/github.com/33cn/chain33/common/db/table/error.go
+17
-0
query.go
vendor/github.com/33cn/chain33/common/db/table/query.go
+113
-0
table.go
vendor/github.com/33cn/chain33/common/db/table/table.go
+0
-0
table_test.go
vendor/github.com/33cn/chain33/common/db/table/table_test.go
+0
-0
utils.go
...thub.com/33cn/chain33/system/dapp/commands/types/utils.go
+1
-1
eventprocess.go
...or/github.com/33cn/chain33/system/mempool/eventprocess.go
+1
-1
util.go
vendor/github.com/33cn/chain33/util/util.go
+2
-0
No files found.
plugin/consensus/init/init.go
View file @
eaaeeb54
package
init
package
init
import
(
_
"github.com/33cn/plugin/plugin/consensus/para"
//auto gen
_
"github.com/33cn/plugin/plugin/consensus/pbft"
//auto gen
_
"github.com/33cn/plugin/plugin/consensus/raft"
//auto gen
_
"github.com/33cn/plugin/plugin/consensus/tendermint"
//auto gen
_
"github.com/33cn/plugin/plugin/consensus/ticket"
//auto gen
)
plugin/crypto/init/init.go
View file @
eaaeeb54
package
init
package
init
import
(
_
"github.com/33cn/plugin/plugin/crypto/ecdsa"
//auto gen
_
"github.com/33cn/plugin/plugin/crypto/sm2"
//auto gen
)
plugin/dapp/init/init.go
View file @
eaaeeb54
package
init
package
init
import
(
_
"github.com/33cn/plugin/plugin/dapp/blackwhite"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/cert"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/evm"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/game"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/hashlock"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/lottery"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/multisig"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/norm"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/paracross"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/pokerbull"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/privacy"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/relay"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/retrieve"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/ticket"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/token"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/trade"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/unfreeze"
//auto gen
_
"github.com/33cn/plugin/plugin/dapp/valnode"
//auto gen
)
plugin/store/init/init.go
View file @
eaaeeb54
package
init
package
init
import
(
_
"github.com/33cn/plugin/plugin/store/kvdb"
//auto gen
_
"github.com/33cn/plugin/plugin/store/kvmvcc"
//auto gen
_
"github.com/33cn/plugin/plugin/store/mpt"
//auto gen
)
vendor/github.com/33cn/chain33/.travis.yml
View file @
eaaeeb54
...
@@ -6,9 +6,9 @@ dist: xenial
...
@@ -6,9 +6,9 @@ dist: xenial
notifications
:
notifications
:
email
:
false
email
:
false
jobs
:
matrix
:
include
:
include
:
-
stag
e
:
check_fmt
-
nam
e
:
check_fmt
sudo
:
require
sudo
:
require
go
:
go
:
-
"
1.9"
-
"
1.9"
...
@@ -23,13 +23,13 @@ jobs:
...
@@ -23,13 +23,13 @@ jobs:
-
make checkgofmt && make fmt_go
-
make checkgofmt && make fmt_go
-
make linter
-
make linter
-
stag
e
:
unit-test
-
nam
e
:
unit-test
go
:
"
1.9.x"
go
:
"
1.9.x"
install
:
skip
install
:
skip
script
:
script
:
-
make test
-
make test
-
stag
e
:
coverage
-
nam
e
:
coverage
if
:
branch = master
if
:
branch = master
go
:
go
:
-
"
1.9.x"
-
"
1.9.x"
...
@@ -41,7 +41,7 @@ jobs:
...
@@ -41,7 +41,7 @@ jobs:
after_success
:
after_success
:
-
bash <(curl -s https://codecov.io/bash)
-
bash <(curl -s https://codecov.io/bash)
-
stag
e
:
deploy
-
nam
e
:
deploy
sudo
:
required
sudo
:
required
services
:
services
:
-
docker
-
docker
...
...
vendor/github.com/33cn/chain33/common/db/db.go
View file @
eaaeeb54
...
@@ -8,7 +8,6 @@ package db
...
@@ -8,7 +8,6 @@ package db
import
(
import
(
"bytes"
"bytes"
"errors"
"fmt"
"fmt"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
...
@@ -16,7 +15,7 @@ import (
...
@@ -16,7 +15,7 @@ import (
)
)
//ErrNotFoundInDb error
//ErrNotFoundInDb error
var
ErrNotFoundInDb
=
errors
.
New
(
"ErrNotFoundInDb"
)
var
ErrNotFoundInDb
=
types
.
ErrNotFound
//Lister 列表接口
//Lister 列表接口
type
Lister
interface
{
type
Lister
interface
{
...
...
vendor/github.com/33cn/chain33/common/db/db_test.go
View file @
eaaeeb54
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
"fmt"
"fmt"
"github.com/33cn/chain33/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
)
)
...
@@ -234,3 +235,26 @@ func testDBIteratorDel(t *testing.T, db DB) {
...
@@ -234,3 +235,26 @@ func testDBIteratorDel(t *testing.T, db DB) {
batch
.
Write
()
batch
.
Write
()
}
}
}
}
func
testLevelDBBatch
(
t
*
testing
.
T
,
db
DB
)
{
batch
:=
db
.
NewBatch
(
false
)
batch
.
Set
([]
byte
(
"hello"
),
[]
byte
(
"world"
))
err
:=
batch
.
Write
()
assert
.
Nil
(
t
,
err
)
v
,
err
:=
db
.
Get
([]
byte
(
"hello"
))
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
v
,
[]
byte
(
"world"
))
//set and del
batch
.
Set
([]
byte
(
"hello1"
),
[]
byte
(
"world"
))
batch
.
Set
([]
byte
(
"hello2"
),
[]
byte
(
"world"
))
batch
.
Set
([]
byte
(
"hello3"
),
[]
byte
(
"world"
))
batch
.
Set
([]
byte
(
"hello4"
),
[]
byte
(
"world"
))
batch
.
Set
([]
byte
(
"hello5"
),
[]
byte
(
"world"
))
batch
.
Delete
([]
byte
(
"hello1"
))
err
=
batch
.
Write
()
assert
.
Nil
(
t
,
err
)
v
,
err
=
db
.
Get
([]
byte
(
"hello1"
))
assert
.
Equal
(
t
,
err
,
types
.
ErrNotFound
)
assert
.
Nil
(
t
,
v
)
}
vendor/github.com/33cn/chain33/common/db/go_level_db_test.go
View file @
eaaeeb54
...
@@ -43,6 +43,18 @@ func TestGoLevelDBIteratorDel(t *testing.T) {
...
@@ -43,6 +43,18 @@ func TestGoLevelDBIteratorDel(t *testing.T) {
testDBIteratorDel
(
t
,
leveldb
)
testDBIteratorDel
(
t
,
leveldb
)
}
}
func
TestLevelDBBatch
(
t
*
testing
.
T
)
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"goleveldb"
)
require
.
NoError
(
t
,
err
)
t
.
Log
(
dir
)
leveldb
,
err
:=
NewGoLevelDB
(
"goleveldb"
,
dir
,
128
)
require
.
NoError
(
t
,
err
)
defer
leveldb
.
Close
()
testLevelDBBatch
(
t
,
leveldb
)
}
// leveldb边界测试
// leveldb边界测试
func
TestGoLevelDBBoundary
(
t
*
testing
.
T
)
{
func
TestGoLevelDBBoundary
(
t
*
testing
.
T
)
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"goleveldb"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"goleveldb"
)
...
...
vendor/github.com/33cn/chain33/common/db/list_helper.go
View file @
eaaeeb54
...
@@ -55,7 +55,6 @@ func (db *ListHelper) List(prefix, key []byte, count, direction int32) (values [
...
@@ -55,7 +55,6 @@ func (db *ListHelper) List(prefix, key []byte, count, direction int32) (values [
return
db
.
IteratorScanFromFirst
(
prefix
,
count
)
return
db
.
IteratorScanFromFirst
(
prefix
,
count
)
}
}
return
db
.
IteratorScanFromLast
(
prefix
,
count
)
return
db
.
IteratorScanFromLast
(
prefix
,
count
)
}
}
if
count
==
1
&&
direction
==
ListSeek
{
if
count
==
1
&&
direction
==
ListSeek
{
it
:=
db
.
db
.
Iterator
(
prefix
,
nil
,
true
)
it
:=
db
.
db
.
Iterator
(
prefix
,
nil
,
true
)
...
...
vendor/github.com/33cn/chain33/common/db/table/count.go
0 → 100644
View file @
eaaeeb54
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
table
import
(
"math"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/types"
)
//Count 计数器
type
Count
struct
{
prefix
string
name
string
kvdb
db
.
KV
num
int64
keydata
[]
byte
}
//NewCount 创建一个计数器
func
NewCount
(
prefix
string
,
name
string
,
kvdb
db
.
KV
)
*
Count
{
keydata
:=
[]
byte
(
prefix
+
"#"
+
name
)
return
&
Count
{
prefix
:
prefix
,
name
:
name
,
kvdb
:
kvdb
,
keydata
:
keydata
,
num
:
math
.
MinInt64
,
}
}
func
(
c
*
Count
)
getKey
()
[]
byte
{
return
c
.
keydata
}
//Save 保存kv
func
(
c
*
Count
)
Save
()
(
kvs
[]
*
types
.
KeyValue
,
err
error
)
{
if
c
.
num
==
math
.
MinInt64
{
return
nil
,
nil
}
var
i
types
.
Int64
i
.
Data
=
c
.
num
item
:=
&
types
.
KeyValue
{
Key
:
c
.
getKey
(),
Value
:
types
.
Encode
(
&
i
)}
kvs
=
append
(
kvs
,
item
)
return
}
//Get count
func
(
c
*
Count
)
Get
()
(
int64
,
error
)
{
if
c
.
num
==
math
.
MinInt64
{
data
,
err
:=
c
.
kvdb
.
Get
(
c
.
getKey
())
if
err
==
types
.
ErrNotFound
{
c
.
num
=
0
}
else
if
err
!=
nil
{
return
0
,
err
}
var
num
types
.
Int64
err
=
types
.
Decode
(
data
,
&
num
)
if
err
!=
nil
{
return
0
,
err
}
c
.
num
=
num
.
Data
}
return
c
.
num
,
nil
}
//Inc 增加1
func
(
c
*
Count
)
Inc
()
(
num
int64
,
err
error
)
{
c
.
num
,
err
=
c
.
Get
()
if
err
!=
nil
{
return
0
,
err
}
c
.
num
++
return
c
.
num
,
nil
}
//Dec 减少1
func
(
c
*
Count
)
Dec
()
(
num
int64
,
err
error
)
{
c
.
num
,
err
=
c
.
Get
()
if
err
!=
nil
{
return
0
,
err
}
c
.
num
--
return
c
.
num
,
nil
}
//Set 这个操作要谨慎使用
func
(
c
*
Count
)
Set
(
i
int64
)
{
c
.
num
=
i
}
vendor/github.com/33cn/chain33/common/db/table/count_test.go
0 → 100644
View file @
eaaeeb54
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
table
import
(
"testing"
"github.com/stretchr/testify/assert"
)
func
TestCount
(
t
*
testing
.
T
)
{
dir
,
leveldb
,
kvdb
:=
getdb
()
defer
dbclose
(
dir
,
leveldb
)
count
:=
NewCount
(
"prefix"
,
"name#hello"
,
kvdb
)
count
.
Inc
()
count
.
Dec
()
count
.
Inc
()
i
,
err
:=
count
.
Get
()
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
i
,
int64
(
1
))
kvs
,
err
:=
count
.
Save
()
assert
.
Nil
(
t
,
err
)
setKV
(
leveldb
,
kvs
)
count
=
NewCount
(
"prefix"
,
"name#hello"
,
kvdb
)
i
,
err
=
count
.
Get
()
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
i
,
int64
(
1
))
count
.
Set
(
2
)
i
,
err
=
count
.
Get
()
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
i
,
int64
(
2
))
}
vendor/github.com/33cn/chain33/common/db/table/error.go
0 → 100644
View file @
eaaeeb54
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
table
import
"errors"
//table 中的错误处理
var
(
ErrEmptyPrimaryKey
=
errors
.
New
(
"ErrEmptyPrimaryKey"
)
ErrPrimaryKey
=
errors
.
New
(
"ErrPrimaryKey"
)
ErrIndexKey
=
errors
.
New
(
"ErrIndexKey"
)
ErrTooManyIndex
=
errors
.
New
(
"ErrTooManyIndex"
)
ErrTablePrefixOrTableName
=
errors
.
New
(
"ErrTablePrefixOrTableName"
)
ErrDupPrimaryKey
=
errors
.
New
(
"ErrDupPrimaryKey"
)
)
vendor/github.com/33cn/chain33/common/db/table/query.go
0 → 100644
View file @
eaaeeb54
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
table
import
(
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/types"
)
//Query 列表查询结构
type
Query
struct
{
table
*
Table
kvdb
db
.
KVDB
}
//ListIndex 根据索引查询列表
//index 用哪个index
//prefix 必须要符合的前缀, 可以为空
//primaryKey 开始查询的位置(不包含数据本身)
//count 最多取的数量
//direction 方向
func
(
query
*
Query
)
ListIndex
(
indexName
string
,
prefix
[]
byte
,
primaryKey
[]
byte
,
count
,
direction
int32
)
(
rows
[]
*
Row
,
err
error
)
{
if
indexName
==
""
{
return
query
.
ListPrimary
(
prefix
,
primaryKey
,
count
,
direction
)
}
p
:=
query
.
table
.
indexPrefix
(
indexName
)
var
k
[]
byte
if
len
(
primaryKey
)
>
0
{
row
,
err
:=
query
.
table
.
GetData
(
primaryKey
)
if
err
!=
nil
{
return
nil
,
err
}
key
,
err
:=
query
.
table
.
index
(
row
,
indexName
)
if
err
!=
nil
{
return
nil
,
err
}
//如果存在prefix
if
prefix
!=
nil
{
p2
:=
commonPrefix
(
prefix
,
key
)
if
len
(
p2
)
!=
len
(
prefix
)
{
return
nil
,
types
.
ErrNotFound
}
p
=
append
(
p
,
p2
...
)
}
k
=
query
.
table
.
getIndexKey
(
indexName
,
key
,
row
.
Primary
)
}
else
{
//这个情况下 k == nil
p
=
append
(
p
,
prefix
...
)
}
values
,
err
:=
query
.
kvdb
.
List
(
p
,
k
,
count
,
direction
)
if
err
!=
nil
{
return
nil
,
err
}
for
_
,
value
:=
range
values
{
row
,
err
:=
query
.
table
.
GetData
(
value
)
if
err
!=
nil
{
return
nil
,
err
}
rows
=
append
(
rows
,
row
)
}
return
rows
,
nil
}
//ListPrimary list primary data
func
(
query
*
Query
)
ListPrimary
(
prefix
[]
byte
,
primaryKey
[]
byte
,
count
,
direction
int32
)
(
rows
[]
*
Row
,
err
error
)
{
p
:=
query
.
table
.
primaryPrefix
()
var
k
[]
byte
if
primaryKey
!=
nil
{
if
prefix
!=
nil
{
p2
:=
commonPrefix
(
prefix
,
primaryKey
)
if
len
(
p2
)
!=
len
(
prefix
)
{
return
nil
,
types
.
ErrNotFound
}
p
=
append
(
p
,
p2
...
)
}
k
=
append
(
p
,
primaryKey
...
)
}
else
{
p
=
append
(
p
,
prefix
...
)
}
values
,
err
:=
query
.
kvdb
.
List
(
p
,
k
,
count
,
direction
)
if
err
!=
nil
{
return
nil
,
err
}
for
_
,
value
:=
range
values
{
row
,
err
:=
query
.
table
.
getRow
(
value
)
if
err
!=
nil
{
return
nil
,
err
}
rows
=
append
(
rows
,
row
)
}
return
rows
,
nil
}
func
commonPrefix
(
key1
,
key2
[]
byte
)
[]
byte
{
l1
:=
len
(
key1
)
l2
:=
len
(
key2
)
l
:=
min
(
l1
,
l2
)
for
i
:=
0
;
i
<
l
;
i
++
{
if
key1
[
i
]
!=
key2
[
i
]
{
return
key1
[
:
i
]
}
}
return
key1
[
0
:
l
]
}
func
min
(
a
,
b
int
)
int
{
if
a
<
b
{
return
a
}
return
b
}
vendor/github.com/33cn/chain33/common/db/table/table.go
0 → 100644
View file @
eaaeeb54
This diff is collapsed.
Click to expand it.
vendor/github.com/33cn/chain33/common/db/table/table_test.go
0 → 100644
View file @
eaaeeb54
This diff is collapsed.
Click to expand it.
vendor/github.com/33cn/chain33/system/dapp/commands/types/utils.go
View file @
eaaeeb54
...
@@ -105,7 +105,7 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
...
@@ -105,7 +105,7 @@ func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isW
transfer
.
Ty
=
cty
.
CoinsActionTransfer
transfer
.
Ty
=
cty
.
CoinsActionTransfer
}
}
}
else
{
}
else
{
v
:=
&
cty
.
CoinsAction_Withdraw
{
Withdraw
:
&
types
.
AssetsWithdraw
{
Amount
:
amountInt64
,
Note
:
[]
byte
(
note
),
ExecName
:
execName
}}
v
:=
&
cty
.
CoinsAction_Withdraw
{
Withdraw
:
&
types
.
AssetsWithdraw
{
Amount
:
amountInt64
,
Note
:
[]
byte
(
note
),
ExecName
:
execName
,
To
:
to
}}
transfer
.
Value
=
v
transfer
.
Value
=
v
transfer
.
Ty
=
cty
.
CoinsActionWithdraw
transfer
.
Ty
=
cty
.
CoinsActionWithdraw
}
}
...
...
vendor/github.com/33cn/chain33/system/mempool/eventprocess.go
View file @
eaaeeb54
...
@@ -97,7 +97,7 @@ func (mem *Mempool) eventProcess() {
...
@@ -97,7 +97,7 @@ func (mem *Mempool) eventProcess() {
func
(
mem
*
Mempool
)
eventTx
(
msg
queue
.
Message
)
{
func
(
mem
*
Mempool
)
eventTx
(
msg
queue
.
Message
)
{
if
!
mem
.
getSync
()
{
if
!
mem
.
getSync
()
{
msg
.
Reply
(
mem
.
client
.
NewMessage
(
""
,
types
.
EventReply
,
&
types
.
Reply
{
Msg
:
[]
byte
(
types
.
ErrNotSync
.
Error
())}))
msg
.
Reply
(
mem
.
client
.
NewMessage
(
""
,
types
.
EventReply
,
&
types
.
Reply
{
Msg
:
[]
byte
(
types
.
ErrNotSync
.
Error
())}))
mlog
.
Error
(
"wrong tx"
,
"err"
,
types
.
ErrNotSync
.
Error
())
mlog
.
Debug
(
"wrong tx"
,
"err"
,
types
.
ErrNotSync
.
Error
())
}
else
{
}
else
{
checkedMsg
:=
mem
.
checkTxs
(
msg
)
checkedMsg
:=
mem
.
checkTxs
(
msg
)
select
{
select
{
...
...
vendor/github.com/33cn/chain33/util/util.go
View file @
eaaeeb54
...
@@ -111,7 +111,9 @@ func CreateTxWithExecer(priv crypto.PrivKey, execer string) *types.Transaction {
...
@@ -111,7 +111,9 @@ func CreateTxWithExecer(priv crypto.PrivKey, execer string) *types.Transaction {
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execer
),
Payload
:
[]
byte
(
"none"
)}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execer
),
Payload
:
[]
byte
(
"none"
)}
tx
.
To
=
address
.
ExecAddress
(
execer
)
tx
.
To
=
address
.
ExecAddress
(
execer
)
tx
,
_
=
types
.
FormatTx
(
execer
,
tx
)
tx
,
_
=
types
.
FormatTx
(
execer
,
tx
)
if
priv
!=
nil
{
tx
.
Sign
(
types
.
SECP256K1
,
priv
)
tx
.
Sign
(
types
.
SECP256K1
,
priv
)
}
return
tx
return
tx
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment