mirror of
				https://git.wownero.com/wownero/wownero.git
				synced 2024-08-15 01:03:23 +00:00 
			
		
		
		
	Merge pull request #9080
47d8899 Fix missing checks for IsObject in ZMQ jsonrpc reading (Lee Clagett)
			
			
This commit is contained in:
		
						commit
						8eab181fe1
					
				
					 2 changed files with 208 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -13,6 +13,7 @@
 | 
			
		|||
#include "cryptonote_basic/cryptonote_format_utils.h"
 | 
			
		||||
#include "cryptonote_core/cryptonote_tx_utils.h"
 | 
			
		||||
#include "serialization/json_object.h"
 | 
			
		||||
#include "rpc/daemon_messages.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
namespace test
 | 
			
		||||
| 
						 | 
				
			
			@ -240,3 +241,9 @@ TEST(JsonSerialization, BulletproofTransaction)
 | 
			
		|||
    EXPECT_EQ(tx_bytes, tx_copy_bytes);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST(JsonRpcSerialization, HandlerFromJson)
 | 
			
		||||
{
 | 
			
		||||
  cryptonote::rpc::FullMessage req_full("{\"jsonrpc\":\"2.0\",\"method\":\"get_hashes_fast\",\"params\":[1]}", true);
 | 
			
		||||
  cryptonote::rpc::GetHashesFast::Request request{};
 | 
			
		||||
  EXPECT_THROW(request.fromJson(req_full.getMessage()), cryptonote::json::WRONG_TYPE);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue