api/msg: include reward field into account and remove signature verification for SendTransactionRequest (api only needs to check if payload is well-formed)
@@ -149,16 +149,6 @@ func (s *sendTransactionRequest) bind(parser *fastjson.Parser, body []byte) erro
}
copy(s.creator[:], senderBuf)
-
- var signature edwards25519.Signature
- copy(signature[:], signatureBuf)
-
- var nonce [8]byte // TODO(kenta): nonce
-
- if !edwards25519.Verify(s.creator, append(nonce[:], append([]byte{s.Tag}, s.payload...)...), signature) {
- return errors.Wrap(err, "sender signature verification failed")
- }
-
copy(s.signature[:], signatureBuf)
return nil
@@ -334,6 +324,9 @@ func (s *account) marshalJSON(arena *fastjson.Arena) ([]byte, error) {
stake, _ := wavelet.ReadAccountStake(snapshot, s.id)
o.Set("stake", arena.NewNumberString(strconv.FormatUint(stake, 10)))
+ reward, _ := wavelet.ReadAccountReward(snapshot, s.id)
+ o.Set("reward", arena.NewNumberString(strconv.FormatUint(reward, 10)))
+
_, isContract := wavelet.ReadAccountContractCode(snapshot, s.id)
if isContract {
o.Set("is_contract", arena.NewTrue())
