From d78b17151ba4fe306bd0d3bb32f82a2f700ff4c9 Mon Sep 17 00:00:00 2001 From: jjy Date: Mon, 8 Apr 2019 16:09:12 +0800 Subject: [PATCH] fix: regenerate protocol --- protocol/src/protocol_generated_verifier.rs | 196 +++----------------- 1 file changed, 28 insertions(+), 168 deletions(-) diff --git a/protocol/src/protocol_generated_verifier.rs b/protocol/src/protocol_generated_verifier.rs index 43d05d247e..d06e38c8da 100644 --- a/protocol/src/protocol_generated_verifier.rs +++ b/protocol/src/protocol_generated_verifier.rs @@ -52,12 +52,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -65,6 +59,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -136,12 +131,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -149,6 +138,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -271,12 +261,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -284,6 +268,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -356,12 +341,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -369,6 +348,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -450,12 +430,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -463,6 +437,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -534,12 +509,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -547,6 +516,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -646,12 +616,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -659,6 +623,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -767,12 +732,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -780,6 +739,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -834,12 +794,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -847,6 +801,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -996,12 +951,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1009,6 +958,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1111,12 +1061,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1124,6 +1068,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1204,12 +1149,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1217,6 +1156,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1297,12 +1237,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1310,6 +1244,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1381,12 +1316,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1394,6 +1323,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1483,12 +1413,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1496,6 +1420,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1670,12 +1595,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1683,6 +1602,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1755,12 +1675,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1768,6 +1682,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1846,12 +1761,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1859,6 +1768,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1947,12 +1857,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1960,6 +1864,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2032,12 +1937,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2045,6 +1944,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2147,12 +2047,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2160,6 +2054,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2241,12 +2136,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2254,6 +2143,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2343,12 +2233,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2356,6 +2240,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2466,12 +2351,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2479,6 +2358,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2542,12 +2422,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2555,6 +2429,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2624,12 +2499,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2637,6 +2506,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2772,12 +2642,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2785,6 +2649,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2871,12 +2736,6 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); - let object_inline_num_bytes = vtab.object_inline_num_bytes(); - if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET - || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET - { - return Err(Error::OutOfBounds); - } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2884,6 +2743,7 @@ pub mod ckb { { return Err(Error::OutOfBounds); } + let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes)