Enhance WebSocket connection management and signer implementation
- Added a pong handler to extend the read deadline upon receiving PONG messages in WebSocket connections, improving connection stability. - Updated the signer implementation to serialize the x-only public key to 32 bytes, ensuring compatibility with the internal format. - Refactored tests to utilize MustNew() for signer initialization, enhancing error handling during key generation. - Bumped version to v0.25.1 to reflect these updates.
This commit is contained in:
@@ -23,7 +23,7 @@ func int64Ptr(i int64) *int64 {
|
||||
|
||||
// Helper function to generate a keypair for testing
|
||||
func generateTestKeypair(t *testing.T) (signer *p8k.Signer, pubkey []byte) {
|
||||
signer = p8k.New()
|
||||
signer = p8k.MustNew()
|
||||
if err := signer.Generate(); chk.E(err) {
|
||||
t.Fatalf("Failed to generate test keypair: %v", err)
|
||||
}
|
||||
@@ -33,7 +33,7 @@ func generateTestKeypair(t *testing.T) (signer *p8k.Signer, pubkey []byte) {
|
||||
|
||||
// Helper function to generate a keypair for benchmarks
|
||||
func generateTestKeypairB(b *testing.B) (signer *p8k.Signer, pubkey []byte) {
|
||||
signer = p8k.New()
|
||||
signer = p8k.MustNew()
|
||||
if err := signer.Generate(); chk.E(err) {
|
||||
b.Fatalf("Failed to generate test keypair: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user