mirror of
https://github.com/number571/go-peer.git
synced 2026-09-12 19:50:00 +05:00
update
This commit is contained in:
parent
5d4905740f
commit
3150ad1f5c
@ -10,6 +10,9 @@
|
||||
|
||||
- `pkg/crypto/scheme/layer1`: Payload32 -> []byte
|
||||
- `pkg/network`: deleted HandleFunc
|
||||
- `pkg/anonymity/qb`: deleted HandleFunc
|
||||
- `pkg/anonymity/qb`: change alg fetch request/response
|
||||
- `pkg/anonymity/qb`: SendPayload, FetchPayload: []byte
|
||||
|
||||
<!-- ... -->
|
||||
|
||||
|
||||
@ -234,39 +234,6 @@ func TestNodeConnection(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// func TestHandleMessage(t *testing.T) {
|
||||
// t.Parallel()
|
||||
|
||||
// node := newTestNode("", 16).(*sNode)
|
||||
|
||||
// ctx := context.Background()
|
||||
// sett := layer1.NewConstructSettings(&layer1.SConstructSettings{
|
||||
// FSettings: node.GetSettings().GetConnSettings().GetMessageSettings(),
|
||||
// })
|
||||
|
||||
// node.HandleFunc(1, nil)
|
||||
// msg1 := layer1.NewMessage(sett, payload.NewPayload32(1, []byte{1}))
|
||||
// if ok := node.handleMessage(ctx, nil, msg1); ok {
|
||||
// t.Fatal("success handle message with nil function")
|
||||
// }
|
||||
|
||||
// node.HandleFunc(1, func(_ context.Context, _ INode, _ conn.IConn, _ layer1.IMessage) error {
|
||||
// return errors.New("some error") //nolint:err113
|
||||
// })
|
||||
// msg2 := layer1.NewMessage(sett, payload.NewPayload32(1, []byte{2}))
|
||||
// if ok := node.handleMessage(ctx, nil, msg2); ok {
|
||||
// t.Fatal("success handle message with got error from function")
|
||||
// }
|
||||
|
||||
// node.HandleFunc(1, func(_ context.Context, _ INode, _ conn.IConn, _ layer1.IMessage) error {
|
||||
// return nil
|
||||
// })
|
||||
// msg3 := layer1.NewMessage(sett, payload.NewPayload32(1, []byte{3}))
|
||||
// if ok := node.handleMessage(ctx, nil, msg3); !ok {
|
||||
// t.Fatal("failed handle message with correct function")
|
||||
// }
|
||||
// }
|
||||
|
||||
func TestNodeSettings(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="code lines: 12795"><title>code lines: 12795</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="96" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="57" height="20" fill="#555"/><rect x="57" width="40" height="20" fill="#4682b4"/><rect width="96" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="295" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">code lines</text><text x="295" y="140" transform="scale(.1)" fill="#fff" textLength="510">code lines</text><text aria-hidden="true" x="770" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="320">12795</text><text x="770" y="140" transform="scale(.1)" fill="#fff" textLength="320">12795</text></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="code lines: 12762"><title>code lines: 12762</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="96" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="57" height="20" fill="#555"/><rect x="57" width="40" height="20" fill="#4682b4"/><rect width="96" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="295" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">code lines</text><text x="295" y="140" transform="scale(.1)" fill="#fff" textLength="510">code lines</text><text aria-hidden="true" x="770" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="320">12762</text><text x="770" y="140" transform="scale(.1)" fill="#fff" textLength="320">12762</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -7,7 +7,7 @@
|
||||
>
|
||||
|
||||
<g>
|
||||
<rect x="20.000000" y="20.000000" width="988.000000" height="600.000000" style="fill: rgb(4, 114, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="20.000000" y="20.000000" width="988.000000" height="600.000000" style="fill: rgb(4, 116, 61);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="28.000000" y="41.600000" width="961.742351" height="570.400000" style="fill: rgb(4, 115, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="28.000000" y="41.600000" width="961.742351" height="570.400000" style="fill: rgb(4, 116, 61);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="390.646261" y="63.200000" width="439.770005" height="280.191334" style="fill: rgb(4, 115, 61);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="390.646261" y="63.200000" width="439.770005" height="280.191334" style="fill: rgb(3, 113, 60);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -91,7 +91,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="390.646261" y="351.391334" width="439.770005" height="252.608666" style="fill: rgb(5, 118, 62);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="390.646261" y="351.391334" width="439.770005" height="252.608666" style="fill: rgb(9, 125, 66);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -169,7 +169,7 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="398.646261" y="84.800000" width="241.372115" height="250.591334" style="fill: rgb(3, 112, 59);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="398.646261" y="84.800000" width="241.372115" height="250.591334" style="fill: rgb(1, 109, 58);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
@ -400,13 +400,13 @@
|
||||
|
||||
|
||||
<g>
|
||||
<rect x="398.646261" y="372.991334" width="192.126973" height="223.008666" style="fill: rgb(15, 134, 71);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
<rect x="398.646261" y="372.991334" width="192.126973" height="223.008666" style="fill: rgb(24, 149, 78);opacity:1;fill-opacity:1.00;stroke:rgb(128,128,128);stroke-width:1px;stroke-opacity:1.00;" />
|
||||
|
||||
<text
|
||||
data-notex="1"
|
||||
text-anchor="start"
|
||||
transform="translate(406.646261,388.591334) scale(1.000000)"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(255, 255, 255); fill-opacity: 1.00; white-space: pre;"
|
||||
style="font-family: Open Sans, verdana, arial, sans-serif !important; font-size: 12px; fill: rgb(0, 0, 0); fill-opacity: 1.00; white-space: pre;"
|
||||
data-math="N">network.go</text>
|
||||
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 31 KiB |
Loading…
Reference in New Issue
Block a user