services: fix gosimple warning
Fix the following warning: ``` S1001: should use copy() instead of a loop (gosimple) ```
This commit is contained in:
parent
2b79a162ce
commit
48ee33fd61
1 changed files with 1 additions and 3 deletions
|
@ -227,9 +227,7 @@ func (n *Notary) OnNewRequest(payload *payload.P2PNotaryRequest) {
|
||||||
// keep the pooled tx valid. We will update its copy => the copy's size will be changed.
|
// keep the pooled tx valid. We will update its copy => the copy's size will be changed.
|
||||||
cp := *payload.MainTransaction
|
cp := *payload.MainTransaction
|
||||||
cp.Scripts = make([]transaction.Witness, len(payload.MainTransaction.Scripts))
|
cp.Scripts = make([]transaction.Witness, len(payload.MainTransaction.Scripts))
|
||||||
for i, w := range payload.MainTransaction.Scripts {
|
copy(cp.Scripts, payload.MainTransaction.Scripts)
|
||||||
cp.Scripts[i] = w
|
|
||||||
}
|
|
||||||
r = &request{
|
r = &request{
|
||||||
main: &cp,
|
main: &cp,
|
||||||
minNotValidBefore: nvbFallback,
|
minNotValidBefore: nvbFallback,
|
||||||
|
|
Loading…
Reference in a new issue