mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Merge pull request #275 from hermeznetwork/feature/api-db-tests-til
Feature/api db tests til
This commit is contained in:
@@ -453,12 +453,12 @@ BEGIN
|
||||
NEW.load_amount IS NULL OR
|
||||
NEW.load_amount_f IS NULL OR
|
||||
(NOT NEW.user_origin AND NEW.batch_num IS NULL) THEN -- If is Coordinator L1, must include batch_num
|
||||
RAISE EXCEPTION 'Invalid L1 tx.';
|
||||
RAISE EXCEPTION 'Invalid L1 tx: %', NEW;
|
||||
END IF;
|
||||
ELSE
|
||||
-- Validate
|
||||
IF NEW.batch_num IS NULL OR NEW.nonce IS NULL THEN
|
||||
RAISE EXCEPTION 'Invalid L2 tx.';
|
||||
RAISE EXCEPTION 'Invalid L2 tx: %', NEW;
|
||||
END IF;
|
||||
-- Set fee if it's null
|
||||
IF NEW.fee IS NULL THEN
|
||||
|
||||
Reference in New Issue
Block a user