From eb6d6d36901cfd31f175c3a9e5dcd3b228387b9b Mon Sep 17 00:00:00 2001 From: Revertron Date: Thu, 29 Apr 2021 19:53:30 +0200 Subject: [PATCH] Fixes in consensus and syles. --- src/blockchain/chain.rs | 7 +++++++ src/webview/styles.css | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/blockchain/chain.rs b/src/blockchain/chain.rs index 34a89e9..6a915b6 100644 --- a/src/blockchain/chain.rs +++ b/src/blockchain/chain.rs @@ -9,6 +9,7 @@ use log::{debug, error, info, trace, warn}; use sqlite::{Connection, State, Statement}; use crate::{Block, Bytes, Keystore, Transaction, check_domain, get_domain_zone, is_yggdrasil_record}; +use crate::blockchain::transaction::TransactionType; use crate::commons::constants::*; use crate::blockchain::types::{BlockQuality, MineResult, Options}; use crate::blockchain::types::BlockQuality::*; @@ -760,6 +761,12 @@ impl Chain { return Rewind; } } + if matches!(Transaction::get_type(&block.transaction), TransactionType::Zone) { + if self.get_zones().len() >= 10 { + warn!("Ignoring excess zone block"); + return Bad; + } + } if let Some(transaction) = &block.transaction { let current_height = match last_block { diff --git a/src/webview/styles.css b/src/webview/styles.css index 0c7263b..32d00f3 100644 --- a/src/webview/styles.css +++ b/src/webview/styles.css @@ -55,7 +55,7 @@ body { } #new_domain_dialog_box { - min-height: 380px; + min-height: 480px; } .delete {