From b734f8d94d0302c787f32a4795130a9031f29870 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Wed, 1 Dec 2021 22:42:11 +0100 Subject: [PATCH] return error is clock time is less or equal than Jan 1st 1970 12:00 AM --- modules/apps/transfer/client/cli/tx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/apps/transfer/client/cli/tx.go b/modules/apps/transfer/client/cli/tx.go index abaa154cb55..74ff6ae802b 100644 --- a/modules/apps/transfer/client/cli/tx.go +++ b/modules/apps/transfer/client/cli/tx.go @@ -1,6 +1,7 @@ package cli import ( + "errors" "fmt" "strings" "time" @@ -104,8 +105,7 @@ corresponding to the counterparty channel. Any timeout set to 0 is disabled.`), timeoutTimestamp = consensusStateTimestamp + timeoutTimestamp } } else { - // rare case: if local clock time is equal to or earlier than Jan 1st, 1970 12:00 AM - timeoutTimestamp = consensusStateTimestamp + timeoutTimestamp + return errors.New("local clock time is not greater than Jan 1st, 1970 12:00 AM") } } }