meshplus/bitxhub

No error will be reported when querying balance of illegal address

dawn-to-dusk opened this issue · 0 comments

Bug Report

1. What did you do?

Test the function named GetAccountBalance with illegal address like this:

	res, err = suite.client.GetAccountBalance("__ _~~+——*/")
	suite.NotNil(err)
	fmt.Println("res:" + string(res.Data))

2. What did you expect to see?

The error isn't nil and the res is nil.

3. What did you see instead?

    TestTester/TestGetAccountBalanceByWrongAddress: case001_chain_test.go:213:
        	Error Trace:	case001_chain_test.go:213
        	Error:      	Expected value not to be nil.
        	Test:       	TestTester/TestGetAccountBalanceByWrongAddress
res:{"type":"normal","balance":0,"contract_count":0,"code_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"}

4. What version of BitXHub are you using? (bitxhub version on BitXHub)

Commit hash: 9ae5793