forked from TrueCloudLab/neoneo-go
*: fix whitespace errors
leading/trailing newlines
This commit is contained in:
parent
6fea16451a
commit
c4e084b0d8
36 changed files with 0 additions and 36 deletions
|
@ -156,7 +156,6 @@ func parseMultisigContract(script []byte) (int, keys.PublicKeys, bool) {
|
|||
return 0, nil, false
|
||||
}
|
||||
ret[i] = pub
|
||||
|
||||
}
|
||||
return nsigs, ret, true
|
||||
}
|
||||
|
|
|
@ -94,7 +94,6 @@ func TestParseMultisigContract(t *testing.T) {
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func fromHex(t *testing.T, s string) []byte {
|
||||
|
|
|
@ -226,7 +226,6 @@ func getNEP11Balance(ctx *cli.Context) error {
|
|||
}
|
||||
fmt.Fprintf(ctx.App.Writer, format, formatArgs...)
|
||||
fmt.Fprintf(ctx.App.Writer, "\tAmount : %s\n", amountStr)
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -79,7 +79,6 @@ func NewDeployTx(bc blockchainer.Blockchainer, name string, sender util.Uint160,
|
|||
o.ContractEvents = conf.Events
|
||||
o.ContractSupportedStandards = conf.SupportedStandards
|
||||
o.SafeMethods = conf.SafeMethods
|
||||
|
||||
}
|
||||
m, err := compiler.CreateManifest(di, o)
|
||||
if err != nil {
|
||||
|
|
|
@ -473,7 +473,6 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
return nil
|
||||
}
|
||||
switch n := node.(type) {
|
||||
|
||||
// General declarations.
|
||||
// var (
|
||||
// x = 2
|
||||
|
|
|
@ -109,7 +109,6 @@ func newStoragePlugin() *storagePlugin {
|
|||
s.interops[interopnames.ToID([]byte(interopnames.SystemRuntimeNotify))] = s.Notify
|
||||
s.interops[interopnames.ToID([]byte(interopnames.SystemRuntimeGetTime))] = s.GetTime
|
||||
return s
|
||||
|
||||
}
|
||||
|
||||
func (s *storagePlugin) syscallHandler(v *vm.VM, id uint32) error {
|
||||
|
|
|
@ -309,7 +309,6 @@ events:
|
|||
s.handleChainBlock(b)
|
||||
default:
|
||||
}
|
||||
|
||||
}
|
||||
close(s.finished)
|
||||
}
|
||||
|
|
|
@ -239,7 +239,6 @@ func TestBlockEncodeDecode(t *testing.T) {
|
|||
|
||||
func TestGetExpectedBlockSize(t *testing.T) {
|
||||
check := func(t *testing.T, stateRootEnabled bool) {
|
||||
|
||||
t.Run("without transactions", func(t *testing.T) {
|
||||
b := newDumbBlock()
|
||||
b.StateRootEnabled = stateRootEnabled
|
||||
|
|
|
@ -1600,7 +1600,6 @@ func (bc *Blockchain) IsTxStillRelevant(t *transaction.Transaction, txpool *memp
|
|||
return bc.verifyTxWitnesses(t, nil, isPartialTx) == nil
|
||||
}
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
// VerifyTx verifies whether transaction is bonafide or not relative to the
|
||||
|
|
|
@ -1529,7 +1529,6 @@ func testDumpAndRestore(t *testing.T, dumpF, restoreF func(c *config.Config)) {
|
|||
require.Equal(t, bc.BlockHeight()-1, lastIndex)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func TestDumpAndRestore(t *testing.T) {
|
||||
|
|
|
@ -208,7 +208,6 @@ func (t *Trie) newSubTrieMany(prefix []byte, kv []keyValue, value []byte) (Node,
|
|||
if len(kv[0].value) == 0 {
|
||||
if len(kv) == 1 {
|
||||
return new(HashNode), 1, nil
|
||||
|
||||
}
|
||||
node, n, err := t.newSubTrieMany(prefix, kv[1:], nil)
|
||||
return node, n + 1, err
|
||||
|
|
|
@ -539,7 +539,6 @@ func (m *Management) getNextContractID(d dao.DAO) (int32, error) {
|
|||
si := d.GetStorageItem(m.ID, keyNextAvailableID)
|
||||
if si == nil {
|
||||
return 0, errors.New("nextAvailableID is not initialized")
|
||||
|
||||
}
|
||||
id := bigint.FromBytes(si)
|
||||
ret := int32(id.Int64())
|
||||
|
|
|
@ -626,7 +626,6 @@ func domainFromString(name string) (string, bool) {
|
|||
return name, true
|
||||
}
|
||||
return name[i+1:], true
|
||||
|
||||
}
|
||||
|
||||
func toDomain(name string) string {
|
||||
|
|
|
@ -337,7 +337,6 @@ func (n *NEO) PostPersist(ic *interop.Context) error {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if n.gasPerBlockChanged.Load().(bool) {
|
||||
gr, err := n.getSortedGASRecordFromDAO(ic.DAO)
|
||||
|
|
|
@ -42,7 +42,6 @@ func getIntWithKey(id int32, dao dao.DAO, key []byte) int64 {
|
|||
si := dao.GetStorageItem(id, key)
|
||||
if si == nil {
|
||||
panic(fmt.Errorf("item with id = %d and key = %s is not initialized", id, hex.EncodeToString(key)))
|
||||
|
||||
}
|
||||
return bigint.FromBytes(si).Int64()
|
||||
}
|
||||
|
|
|
@ -116,7 +116,6 @@ func TestDesignate_DesignateAsRoleTx(t *testing.T) {
|
|||
bc.setNodesByRole(t, true, noderoles.NeoFSAlphabet, pubs)
|
||||
bc.getNodesByRole(t, true, noderoles.NeoFSAlphabet, bc.BlockHeight()+1, 1)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func TestDesignate_DesignateAsRole(t *testing.T) {
|
||||
|
|
|
@ -577,7 +577,6 @@ func TestContractDestroy(t *testing.T) {
|
|||
t.Run("check contract", func(t *testing.T) {
|
||||
checkContractState(t, bc, cs1.Hash, nil)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,6 @@ func TestExpiration(t *testing.T) {
|
|||
aer, err = bc.GetAppExecResults(tx.Hash(), trigger.Application)
|
||||
require.NoError(t, err)
|
||||
checkResult(t, &aer[0], stackitem.Null{})
|
||||
|
||||
}
|
||||
|
||||
const secondsInYear = 365 * 24 * 3600
|
||||
|
|
|
@ -226,7 +226,6 @@ func TestNEO_CalculateBonus(t *testing.T) {
|
|||
res, err := neo.CalculateNEOHolderReward(ic.DAO, big.NewInt(100), 5, 15)
|
||||
require.NoError(t, err)
|
||||
require.EqualValues(t, (100*5*5/10)+(100*5*1/10), res.Int64())
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,6 @@ func TestMarshalUnmarshalJSONNotificationEvent(t *testing.T) {
|
|||
err := json.Unmarshal([]byte(errCase), new(NotificationEvent))
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -76,5 +76,4 @@ func TestOracleRequest_EncodeBinary(t *testing.T) {
|
|||
t.Run("Method", runInvalid(5, stackitem.NewMap()))
|
||||
t.Run("UserData", runInvalid(6, stackitem.NewMap()))
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
|
||||
func TestNEP2Encrypt(t *testing.T) {
|
||||
for _, testCase := range keytestcases.Arr {
|
||||
|
||||
privKey, err := NewPrivateKeyFromHex(testCase.PrivateKey)
|
||||
if testCase.Invalid {
|
||||
assert.Error(t, err)
|
||||
|
|
|
@ -161,7 +161,6 @@ func (p *PublicKey) getBytes(compressed bool) []byte {
|
|||
prefix = 0x04
|
||||
yBytes := p.Y.Bytes()
|
||||
copy(res[1+coordLen+coordLen-len(yBytes):], yBytes)
|
||||
|
||||
}
|
||||
res[0] = prefix
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ func TestFixed8Add(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFixed8Sub(t *testing.T) {
|
||||
|
||||
a := Fixed8FromInt64(42)
|
||||
b := Fixed8FromInt64(34)
|
||||
|
||||
|
|
|
@ -119,7 +119,6 @@ func (w *BinWriter) WriteVarUint(val uint64) {
|
|||
w.WriteB(byte(0xfe))
|
||||
w.WriteU32LE(uint32(val))
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
w.WriteB(byte(0xff))
|
||||
|
|
|
@ -34,7 +34,6 @@ func (p *GetBlocks) DecodeBinary(br *io.BinReader) {
|
|||
if p.Count < -1 || p.Count == 0 {
|
||||
br.Err = errors.New("invalid count")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// EncodeBinary implements Serializable interface.
|
||||
|
|
|
@ -409,7 +409,6 @@ func (s *Server) run() {
|
|||
// because we have two goroutines sending signals here
|
||||
s.lock.Unlock()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,6 @@ func TestServerRegisterPeer(t *testing.T) {
|
|||
}
|
||||
return false
|
||||
}, time.Second, time.Millisecond*50)
|
||||
|
||||
}
|
||||
|
||||
func TestGetBlocksByIndex(t *testing.T) {
|
||||
|
|
|
@ -209,7 +209,6 @@ func (c *WSClient) wsWriter() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (c *WSClient) makeWsRequest(r *request.Raw) (*response.Raw, error) {
|
||||
|
|
|
@ -44,7 +44,6 @@ func NewError(code int64, httpCode int, message string, data string, cause error
|
|||
Message: message,
|
||||
Data: data,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// NewParseError creates a new error with code
|
||||
|
|
|
@ -421,7 +421,6 @@ requestloop:
|
|||
break requestloop
|
||||
case resChan <- res:
|
||||
}
|
||||
|
||||
}
|
||||
s.subsLock.Lock()
|
||||
delete(s.subscribers, subscr)
|
||||
|
|
|
@ -1261,7 +1261,6 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) []
|
|||
tc.check(t, e, res)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -311,7 +311,6 @@ func TestFilteredBlockSubscriptions(t *testing.T) {
|
|||
rmap := resp.Payload[0].(map[string]interface{})
|
||||
primary := rmap["primary"].(float64)
|
||||
require.Equal(t, 3, int(primary))
|
||||
|
||||
}
|
||||
callUnsubscribe(t, c, respMsgs, blockSubID)
|
||||
finishedFlag.CAS(false, true)
|
||||
|
|
|
@ -78,7 +78,6 @@ func TestParseNeoFSURL(t *testing.T) {
|
|||
require.Equal(t, tc.params, ps)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ func (t *incompleteTx) addResponse(pub *keys.PublicKey, sig []byte, isBackup boo
|
|||
ok: tx != nil,
|
||||
sig: sig,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// finalize checks is either main or backup tx has sufficient number of signatures and returns
|
||||
|
|
|
@ -753,7 +753,6 @@ func TestArithNullArg(t *testing.T) {
|
|||
runWithArgs(t, prog, false, 0, stackitem.Null{})
|
||||
runWithArgs(t, prog, nil, stackitem.NewInterop(nil), 1) // also has `.Value() == nil`
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue