Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multisend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
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
李伟@五瓣科技
multisend
Commits
eb7d1b37
Commit
eb7d1b37
authored
Mar 21, 2022
by
李伟@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix take for
parent
5c719026
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
19 deletions
+28
-19
http.go
http.go
+28
-19
No files found.
http.go
View file @
eb7d1b37
...
@@ -756,11 +756,13 @@ func (web *WebServicer) sendBatchTxsFromQueue(fromAddr string, toAddrs []string,
...
@@ -756,11 +756,13 @@ func (web *WebServicer) sendBatchTxsFromQueue(fromAddr string, toAddrs []string,
var
hashesBytes
[]
byte
=
make
([]
byte
,
0
,
32
*
batchTxHashSize
)
var
hashesBytes
[]
byte
=
make
([]
byte
,
0
,
32
*
batchTxHashSize
)
if
txF
,
ok
:=
txAsInterface
.
(
TxWithFrom
);
ok
{
if
txF
,
ok
:=
txAsInterface
.
(
TxWithFrom
);
ok
{
for
j
:=
0
;
j
<
batchTxHashSize
;
j
++
{
j
:=
0
for
;
j
<
batchTxHashSize
;
j
++
{
var
txsBytes
[]
byte
var
txsBytes
[]
byte
var
batchTxs
[]
TxWithFrom
=
make
([]
TxWithFrom
,
0
,
batchTxSize
)
var
batchTxs
[]
TxWithFrom
=
make
([]
TxWithFrom
,
0
,
batchTxSize
)
for
i
:=
0
;
i
<
batchTxSize
;
i
++
{
i
:=
0
for
;
i
<
batchTxSize
;
i
++
{
if
k
==
0
{
if
k
==
0
{
beginOriginalTx
=
txF
.
Tx
.
Hash
()
beginOriginalTx
=
txF
.
Tx
.
Hash
()
}
}
...
@@ -778,30 +780,37 @@ func (web *WebServicer) sendBatchTxsFromQueue(fromAddr string, toAddrs []string,
...
@@ -778,30 +780,37 @@ func (web *WebServicer) sendBatchTxsFromQueue(fromAddr string, toAddrs []string,
}
}
}
}
h
:=
sha256
.
New
()
if
i
==
batchTxSize
-
1
||
k
==
len
(
txFs
)
-
1
{
if
_
,
err
:=
h
.
Write
(
txsBytes
);
err
!=
nil
{
return
err
}
hashBytes
:=
h
.
Sum
(
nil
)
h
:=
sha256
.
New
()
hashesBytes
=
append
(
hashesBytes
,
hashBytes
...
)
if
_
,
err
:=
h
.
Write
(
txsBytes
);
err
!=
nil
{
redisTxlist
=
append
(
redisTxlist
,
OriginalBatchTxs
{
Hash
:
hashBytes
,
Txs
:
batchTxs
})
return
err
}
if
k
==
len
(
txFs
)
-
1
{
hashBytes
:=
h
.
Sum
(
nil
)
endOriginalTx
=
txF
.
Tx
.
Hash
()
hashesBytes
=
append
(
hashesBytes
,
hashBytes
...
)
break
redisTxlist
=
append
(
redisTxlist
,
OriginalBatchTxs
{
Hash
:
hashBytes
,
Txs
:
batchTxs
})
if
k
==
len
(
txFs
)
-
1
{
endOriginalTx
=
txF
.
Tx
.
Hash
()
break
}
}
}
}
}
tx
,
err
:=
web
.
cli
.
BuildTx
(
&
hashesBytes
)
if
j
==
batchTxHashSize
-
1
||
k
==
len
(
txFs
)
-
1
{
if
err
!=
nil
{
tx
,
err
:=
web
.
cli
.
BuildTx
(
&
hashesBytes
)
return
err
}
consenusTxs
=
append
(
consenusTxs
,
tx
)
if
err
!=
nil
{
consTxWithBatchs
=
append
(
consTxWithBatchs
,
ConsTxWithBatchHash
{
ConsTxHash
:
tx
.
Hash
()
.
Bytes
(),
return
err
BatchTxsHash
:
hashesBytes
})
}
consenusTxs
=
append
(
consenusTxs
,
tx
)
consTxWithBatchs
=
append
(
consTxWithBatchs
,
ConsTxWithBatchHash
{
ConsTxHash
:
tx
.
Hash
()
.
Bytes
(),
BatchTxsHash
:
hashesBytes
})
}
}
}
}
}
...
...
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