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
d63049cc
Commit
d63049cc
authored
Jan 09, 2019
by
linj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rollback
parent
63c47140
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
testnode.go
vendor/github.com/33cn/chain33/util/testnode/testnode.go
+21
-0
No files found.
vendor/github.com/33cn/chain33/util/testnode/testnode.go
View file @
d63049cc
...
@@ -205,6 +205,27 @@ func (mock *Chain33Mock) SendAndSign(priv crypto.PrivKey, hextx string) ([]byte,
...
@@ -205,6 +205,27 @@ func (mock *Chain33Mock) SendAndSign(priv crypto.PrivKey, hextx string) ([]byte,
return
reply
.
GetMsg
(),
nil
return
reply
.
GetMsg
(),
nil
}
}
//SendAndSignNonce 用外部传入的nonce 重写nonce
func
(
mock
*
Chain33Mock
)
SendAndSignNonce
(
priv
crypto
.
PrivKey
,
hextx
string
,
nonce
int64
)
([]
byte
,
error
)
{
txbytes
,
err
:=
hex
.
DecodeString
(
hextx
)
if
err
!=
nil
{
return
nil
,
err
}
tx
:=
&
types
.
Transaction
{}
err
=
types
.
Decode
(
txbytes
,
tx
)
if
err
!=
nil
{
return
nil
,
err
}
tx
.
Nonce
=
nonce
tx
.
Fee
=
1e6
tx
.
Sign
(
types
.
SECP256K1
,
priv
)
reply
,
err
:=
mock
.
api
.
SendTx
(
tx
)
if
err
!=
nil
{
return
nil
,
err
}
return
reply
.
GetMsg
(),
nil
}
func
newWalletRealize
(
qAPI
client
.
QueueProtocolAPI
)
{
func
newWalletRealize
(
qAPI
client
.
QueueProtocolAPI
)
{
seed
:=
&
types
.
SaveSeedByPw
{
seed
:=
&
types
.
SaveSeedByPw
{
Seed
:
"subject hamster apple parent vital can adult chapter fork business humor pen tiger void elephant"
,
Seed
:
"subject hamster apple parent vital can adult chapter fork business humor pen tiger void elephant"
,
...
...
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