mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Whisper now 100% encrypted.
This commit is contained in:
parent
72af3456df
commit
7ed2dd65c8
@ -34,7 +34,7 @@ BOOST_AUTO_TEST_CASE(topic)
|
|||||||
{
|
{
|
||||||
cnote << "Testing Whisper...";
|
cnote << "Testing Whisper...";
|
||||||
auto oldLogVerbosity = g_logVerbosity;
|
auto oldLogVerbosity = g_logVerbosity;
|
||||||
g_logVerbosity = 4;
|
g_logVerbosity = 0;
|
||||||
|
|
||||||
bool started = false;
|
bool started = false;
|
||||||
unsigned result = 0;
|
unsigned result = 0;
|
||||||
@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(topic)
|
|||||||
{
|
{
|
||||||
for (auto i: wh->checkWatch(w))
|
for (auto i: wh->checkWatch(w))
|
||||||
{
|
{
|
||||||
Message msg = wh->envelope(i).open(wh->filterKey(w));
|
Message msg = wh->envelope(i).open(wh->fullTopic(w));
|
||||||
last = RLP(msg.payload()).toInt<unsigned>();
|
last = RLP(msg.payload()).toInt<unsigned>();
|
||||||
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
||||||
result += last;
|
result += last;
|
||||||
@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(forwarding)
|
|||||||
{
|
{
|
||||||
for (auto i: wh->checkWatch(w))
|
for (auto i: wh->checkWatch(w))
|
||||||
{
|
{
|
||||||
Message msg = wh->envelope(i).open(wh->filterKey(w));
|
Message msg = wh->envelope(i).open(wh->fullTopic(w));
|
||||||
unsigned last = RLP(msg.payload()).toInt<unsigned>();
|
unsigned last = RLP(msg.payload()).toInt<unsigned>();
|
||||||
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
||||||
result = last;
|
result = last;
|
||||||
@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE(forwarding)
|
|||||||
{
|
{
|
||||||
for (auto i: wh->checkWatch(w))
|
for (auto i: wh->checkWatch(w))
|
||||||
{
|
{
|
||||||
Message msg = wh->envelope(i).open(wh->filterKey(w));
|
Message msg = wh->envelope(i).open(wh->fullTopic(w));
|
||||||
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
||||||
}
|
}
|
||||||
this_thread::sleep_for(chrono::milliseconds(50));
|
this_thread::sleep_for(chrono::milliseconds(50));
|
||||||
@ -215,7 +215,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding)
|
|||||||
{
|
{
|
||||||
for (auto i: wh->checkWatch(w))
|
for (auto i: wh->checkWatch(w))
|
||||||
{
|
{
|
||||||
Message msg = wh->envelope(i).open(wh->filterKey(w));
|
Message msg = wh->envelope(i).open(wh->fullTopic(w));
|
||||||
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
||||||
}
|
}
|
||||||
this_thread::sleep_for(chrono::milliseconds(50));
|
this_thread::sleep_for(chrono::milliseconds(50));
|
||||||
@ -255,7 +255,7 @@ BOOST_AUTO_TEST_CASE(asyncforwarding)
|
|||||||
{
|
{
|
||||||
for (auto i: wh->checkWatch(w))
|
for (auto i: wh->checkWatch(w))
|
||||||
{
|
{
|
||||||
Message msg = wh->envelope(i).open(wh->filterKey(w));
|
Message msg = wh->envelope(i).open(wh->fullTopic(w));
|
||||||
unsigned last = RLP(msg.payload()).toInt<unsigned>();
|
unsigned last = RLP(msg.payload()).toInt<unsigned>();
|
||||||
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
cnote << "New message from:" << msg.from().abridged() << RLP(msg.payload()).toInt<unsigned>();
|
||||||
result = last;
|
result = last;
|
||||||
|
Loading…
Reference in New Issue
Block a user