EEMplekei / BlockChat

A blockchain from scratch
0 stars 0 forks source link

Change create_transaction for further input validation #24

Closed ntua-el19096 closed 8 months ago

ntua-el19096 commented 8 months ago

For the time being /create_transaction endpoint allows API callers to make the app crash based on their input. We should be more strict to input validation. Also introduce a check that does not allow the caller to send make a transaction with the sender and recipient address being the same.

ntua-el19848 commented 8 months ago

Other than

a check that does not allow the caller to send make a transaction with the sender and recipient address being the same

what other case leads to crash?

ntua-el19848 commented 8 months ago

THOUGHTS:

ntua-el19848 commented 8 months ago

Now it works for same receiver_id, sender_id only in fees

In COINS-MESSAGES image

In FEES image

DONE IN COMMIT

SHA eadb9e5da5bc3bcb18d4b47afc9c956bc552696a